aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Singleton <matt@xcolour.net>2014-02-10 16:53:31 -0500
committerMatt Singleton <matt@xcolour.net>2014-02-10 16:53:31 -0500
commit5d7a8745a2a486c712c89c4893425342c429b111 (patch)
tree9923289f06e1ad8efaaf8cffbacc286640754626
parenteca7c64eee59dc37413a44dbbb6f420689b78175 (diff)
safer term title formatting
-rw-r--r--zsh/behavior.zsh4
1 files changed, 2 insertions, 2 deletions
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