From 557baa173c6be93e475d6e25d3fb0c80164d6e87 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Mon, 29 Aug 2011 16:08:28 +0000 Subject: users/16291: prompt_bart_preexec uses history text in the non-"fg" case to avoid alias expansion. --- Functions/Prompts/prompt_bart_setup | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Functions') diff --git a/Functions/Prompts/prompt_bart_setup b/Functions/Prompts/prompt_bart_setup index a264cdce1..6cbbb71c7 100644 --- a/Functions/Prompts/prompt_bart_setup +++ b/Functions/Prompts/prompt_bart_setup @@ -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 } -- cgit 1.4.1