Skip to content

Commit

Permalink
Merge pull request ohmyzsh#2341 from mcornella/title_backticks
Browse files Browse the repository at this point in the history
Avoid evaluating special chars in $LINE on title command (fixes ohmyzsh#2234)
  • Loading branch information
robbyrussell committed Mar 8, 2014
2 parents a811ab0 + a951600 commit 48579eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/termsupport.zsh
Expand Up @@ -27,9 +27,8 @@ 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
local LINE="${2:gs/$/\\$}"
LINE="${LINE:gs/%/%%}"
title "$CMD" "%100>...>$LINE%<<"
local LINE="${2:gs/%/%%}"
title '$CMD' '%100>...>$LINE%<<'
}

autoload -U add-zsh-hook
Expand Down

0 comments on commit 48579eb

Please sign in to comment.