From f0e3684ff541aaea5f747073989c2fda517307ce Mon Sep 17 00:00:00 2001 From: Russell Harmon Date: Wed, 27 Jul 2011 07:43:32 -0700 Subject: [PATCH] Escape the arguments in precmd before trying to set title. The arguments passed to precmd that are used to set the title ($2 and $CMD) were not properly being escaped for prompt expansion. Fixes issue 150. --- lib/termsupport.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 22e7f372f..6ec8b5dfb 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -25,5 +25,8 @@ function preexec { emulate -L zsh setopt extended_glob local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd - title "$CMD" "%100>...>$2%<<" + local psvar + psvar[1]="$CMD" + psvar[2]="$2" + title "%1v" "%100>...>%2v%<<" }