175310ae271364ceb5289a14284b1787677abc33

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #2661 from mcornella/fix_title_tab_percent

Fix escaping of $CMD of automatic title

Diff

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