X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=2690cfdfb427810a7e1dc9cbb0f51c958d858090;hb=bbfd10f332733441b4924c206a623ff7dbfa22ff;hp=43cda0cd9f93be08c13d216a809f2f387b626bcd;hpb=05add691b8590d4b4532f1e0111f32dc1723494a;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 43cda0c..2690cfd 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=( @@ -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 @@ -2819,6 +2817,17 @@ graphic chipset." return 1 } fi + + if check_com -c tmate && check_com -c qrencode ; then + function grml-remote-support() { + tmate -L grml-remote-support new -s grml-remote-support -d + tmate -L grml-remote-support wait tmate-ready + tmate -L grml-remote-support display -p '#{tmate_ssh}' | qrencode -t ANSI + echo "tmate session: $(tmate -L grml-remote-support display -p '#{tmate_ssh}')" + echo + echo "Scan this QR code and send it to your support team." + } + fi } # now run the functions @@ -3490,6 +3499,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 +3549,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))