1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

users/16291: prompt_bart_preexec uses history text in the non-"fg" case

to avoid alias expansion.
This commit is contained in:
Bart Schaefer 2011-08-29 16:08:28 +00:00
parent c0ec6c4238
commit 557baa173c
2 changed files with 9 additions and 3 deletions

View file

@ -70,7 +70,7 @@ integer PSCOL=1
typeset PSCMD=
prompt_bart_preexec () {
setopt localoptions noxtrace noksharrays unset
setopt localoptions noxtrace noshwordsplit noksharrays unset
local -a cmd; cmd=( ${(z)3} )
if [[ $cmd[1] = fg ]]
then
@ -84,7 +84,8 @@ prompt_bart_preexec () {
then
PSCMD=$jobtexts[%?$2]
else
PSCMD=$2
# Use history text to avoid alias expansion
PSCMD=$history[$HISTCMD]
fi
return 0
}