mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
users/16291: prompt_bart_preexec uses history text in the non-"fg" case
to avoid alias expansion.
This commit is contained in:
parent
c0ec6c4238
commit
557baa173c
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-08-29 Barton E. Schaefer <schaefer@brasslantern.com>
|
||||||
|
|
||||||
|
* users/16291: Functions/Prompts/prompt_bart_setup: revert to
|
||||||
|
using history text in non-"fg" case to avoid alias expansion.
|
||||||
|
|
||||||
2011-08-29 Mikael Magnusson <mikachu@gmail.com>
|
2011-08-29 Mikael Magnusson <mikachu@gmail.com>
|
||||||
|
|
||||||
* 29722: Completion/X/Command/_mplayer: escape colon.
|
* 29722: Completion/X/Command/_mplayer: escape colon.
|
||||||
|
@ -15344,5 +15349,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.5448 $
|
* $Revision: 1.5449 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
@ -70,7 +70,7 @@ integer PSCOL=1
|
||||||
typeset PSCMD=
|
typeset PSCMD=
|
||||||
|
|
||||||
prompt_bart_preexec () {
|
prompt_bart_preexec () {
|
||||||
setopt localoptions noxtrace noksharrays unset
|
setopt localoptions noxtrace noshwordsplit noksharrays unset
|
||||||
local -a cmd; cmd=( ${(z)3} )
|
local -a cmd; cmd=( ${(z)3} )
|
||||||
if [[ $cmd[1] = fg ]]
|
if [[ $cmd[1] = fg ]]
|
||||||
then
|
then
|
||||||
|
@ -84,7 +84,8 @@ prompt_bart_preexec () {
|
||||||
then
|
then
|
||||||
PSCMD=$jobtexts[%?$2]
|
PSCMD=$jobtexts[%?$2]
|
||||||
else
|
else
|
||||||
PSCMD=$2
|
# Use history text to avoid alias expansion
|
||||||
|
PSCMD=$history[$HISTCMD]
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue