Merge pull request #2341 from mcornella/title_backticks
Avoid evaluating special chars in $LINE on title command (fixes #2234)
Diff
1diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
2index 80319e1a86966b4a763c9b6a4209607a99b7a4b1..5f2fe63d422f6b0df580092fe8c51f0d67ed9fe6 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:gs/%/%%}"
13+ title '$CMD' '%100>...>$LINE%<<'
14 }
1516 autoload -U add-zsh-hook