mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Escape the arguments in precmd before trying to set title.
The arguments passed to precmd that are used to set the title ($2 and $CMD) were not properly being escaped for prompt expansion. Fixes issue 150.
This commit is contained in:
parent
3350c2298f
commit
f0e3684ff5
1 changed files with 4 additions and 1 deletions
|
|
@ -25,5 +25,8 @@ function preexec {
|
|||
emulate -L zsh
|
||||
setopt extended_glob
|
||||
local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd
|
||||
title "$CMD" "%100>...>$2%<<"
|
||||
local psvar
|
||||
psvar[1]="$CMD"
|
||||
psvar[2]="$2"
|
||||
title "%1v" "%100>...>%2v%<<"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue