b0fbe0d11ac60074b4fdc20e332bc2db3e0c0066

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Avoid evaluating special chars in $LINE on title command (fixes #2234)

Diff

 1diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
 2index 80319e1a86966b4a763c9b6a4209607a99b7a4b1..6eba8f69a1e703f21dc70c66831307ada79cd5ff 100644
 3--- a/lib/termsupport.zsh
 4+++ b/lib/termsupport.zsh
 5@@ -27,9 +27,8 @@ function omz_termsupport_preexec {
 6   emulate -L zsh
 7   setopt extended_glob
 8   local CMD=${1[(wr)^(*=*|sudo|ssh|rake|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd
 9-  local LINE="${2:gs/$/\\$}"
10-  LINE="${LINE:gs/%/%%}"
11-  title "$CMD" "%100>...>$LINE%<<"
12+  local LINE="${2}"
13+  title "$CMD" '%100>...>$LINE%<<'
14 }
15 
16 autoload -U add-zsh-hook