From 5d7a8745a2a486c712c89c4893425342c429b111 Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Mon, 10 Feb 2014 16:53:31 -0500 Subject: safer term title formatting --- zsh/behavior.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'zsh') diff --git a/zsh/behavior.zsh b/zsh/behavior.zsh index 19d9ebc..7e7b243 100644 --- a/zsh/behavior.zsh +++ b/zsh/behavior.zsh @@ -24,10 +24,10 @@ setopt hist_verify # load hist into command buffer rather than exec immediately case "$TERM" in xterm*|rxvt*|screen*) term_preexec () { - print -Pn "\e]0;%n@%m:%~ ($1)\a" # xterm + printf '\e]0;%s (%s)\a' ${(%):-'%n@%m:%~'} "$1" } term_precmd () { - print -Pn "\e]0;%n@%m:%~\a" # xterm + printf '\e]0;%s\a' ${(%):-'%n@%m:%~'} } ;; esac -- cgit v1.2.3