diff options
author | Robby Russell <robby@planetargon.com> | 2013-06-16 11:50:59 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-06-16 11:50:59 -0700 |
commit | b88b5b2ed6923344b7a79ebbeea3822b0b502f3f (patch) | |
tree | 424e8bb8b8b5e1def206c61286662df9ac185a25 /lib/termsupport.zsh | |
parent | f63de87e079b533f8be87687943fe993dbbc7b06 (diff) | |
parent | ab7604e5c2a4e07e656b3e4edf0d3e45407665e5 (diff) | |
download | zsh-b88b5b2ed6923344b7a79ebbeea3822b0b502f3f.tar.gz zsh-b88b5b2ed6923344b7a79ebbeea3822b0b502f3f.tar.bz2 zsh-b88b5b2ed6923344b7a79ebbeea3822b0b502f3f.zip |
Merge pull request #1885 from eakret/termsupport-fix
Escape both % and $ in the command line
Diffstat (limited to 'lib/termsupport.zsh')
-rw-r--r-- | lib/termsupport.zsh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e3828da14..80319e1a8 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -27,7 +27,9 @@ function omz_termsupport_preexec { emulate -L zsh setopt extended_glob local CMD=${1[(wr)^(*=*|sudo|ssh|rake|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd - title "$CMD" "%100>...>${2:gs/%/%%}%<<" + local LINE="${2:gs/$/\\$}" + LINE="${LINE:gs/%/%%}" + title "$CMD" "%100>...>$LINE%<<" } autoload -U add-zsh-hook |