zsh: fix preexec with +%s

This commit is contained in:
Mathieu Maret 2019-10-28 10:42:02 +01:00
parent 8944348eee
commit d22d026c59

View File

@ -34,11 +34,12 @@ case $TERM in
} }
preexec () { preexec () {
if [[ -v SSH_CONNECTION ]]; then if [[ -v SSH_CONNECTION ]]; then
print -Pn "\e]0;[%n@%M][%~]# ($1)\a" print -Pn "\e]0;[%n@%M][%~]# (${1:gs/%/%%})\a"
else else
print -Pn "\e]0;[%~]# ($1)\a" print -Pn "\e]0;[%~]# (${1:gs/%/%%})\a"
fi fi
} }
;; ;;
screen) screen)
precmd () { precmd () {