X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=231de8e706d28a47b2c101f022aa2c22a89b3717;hb=99ad5c14ca391af98703fca561d40497e94d1469;hp=2875222438588c2505557c0d71b8c6f67b185c52;hpb=764227657c87ea0c1b85bedfbece407c3a02535d;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 2875222..231de8e 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -843,6 +843,8 @@ function grmlcomp () { localname=$(hostname) elif check_com hostnamectl ; then localname=$(hostnamectl --static) + else + localname="$(uname -n)" fi hosts=( @@ -1864,7 +1866,7 @@ done function batterydarwin () { GRML_BATTERY_LEVEL='' local -a table -table=( ${$(pmset -g ps)[(w)7,8]%%(\%|);} ) +table=( ${$(pmset -g ps)[(w)8,9]%%(\%|);} ) if [[ -n $table[2] ]] ; then case $table[2] in charging) @@ -2518,11 +2520,7 @@ function grml_vcs_to_screen_title () { function grml_maintain_name () { local localname - if check_com hostname ; then - localname=$(hostname) - elif check_com hostnamectl ; then - localname=$(hostnamectl --static) - fi + localname="$(uname -n)" # set hostname if not running on local machine if [[ -n "$HOSTNAME" ]] && [[ "$HOSTNAME" != "${localname}" ]] ; then @@ -3490,6 +3488,11 @@ function simple-extract () { USES_STDIN=true USES_STDOUT=false ;; + *tar.zst) + DECOMP_CMD="tar --zstd -xvf -" + USES_STDIN=true + USES_STDOUT=false + ;; *tar) DECOMP_CMD="tar -xvf -" USES_STDIN=true @@ -3535,6 +3538,11 @@ function simple-extract () { USES_STDIN=true USES_STDOUT=true ;; + *zst) + DECOMP_CMD="zstd -d -c -" + USES_STDIN=true + USES_STDOUT=true + ;; *) print "ERROR: '$ARCHIVE' has unrecognized archive type." >&2 RC=$((RC+1))