From d05471722fa27dc3c8c3db15ee2e39fb019a4680 Mon Sep 17 00:00:00 2001 From: hanez Date: Mon, 16 Nov 2026 00:20:05 +0100 Subject: [PATCH] Some .zsh updates. --- .zsh/functions.d/moerx.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.zsh/functions.d/moerx.sh b/.zsh/functions.d/moerx.sh index 623bc7c6..c5005b66 100644 --- a/.zsh/functions.d/moerx.sh +++ b/.zsh/functions.d/moerx.sh @@ -1,6 +1,8 @@ if [[ -n $SSH_CONNECTION ]]; then autoload -Uz add-zsh-hook moerx_ssh_title() { + emulate -L zsh + setopt typesetsilent local program=${1:t} printf '\033]2;%s:%s\007' "${HOST%%.*}" "$program" local directory=$PWD @@ -12,12 +14,12 @@ if [[ -n $SSH_CONNECTION ]]; then printf '\033]777;moerx-cwd;%s\007' "$directory" } moerx_ssh_preexec() { - local -a words - words=(${(z)1}) - moerx_ssh_title "${(Q)words[1]}" + emulate -L zsh + setopt typesetsilent + local -a command_words=(${(z)1}) + moerx_ssh_title "${(Q)command_words[1]}" } moerx_ssh_precmd() { moerx_ssh_title zsh; } add-zsh-hook preexec moerx_ssh_preexec add-zsh-hook precmd moerx_ssh_precmd fi -