From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1922 invoked by alias); 29 Aug 2011 15:44:38 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16291 Received: (qmail 8541 invoked from network); 29 Aug 2011 15:44:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110829084425.ZM32208@torch.brasslantern.com> Date: Mon, 29 Aug 2011 08:44:25 -0700 In-reply-to: Comments: In reply to Vin Shelton "Re: Prompt theme: Show the original job text after foregrounding" (Aug 28, 12:16pm) References: <110815230507.ZM3115@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Prompt theme: Show the original job text after foregrounding MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Aug 28, 12:16pm, Vin Shelton wrote: } } I think your latest change has caused alias expansion to occur for the } upper left prompt. Indeed, that's a side-effect I hadn't considered. I've almost entirely replaced aliases with functions now because of the inability to refer to positional parameters in zsh aliases, so I hadn't noticed. I like it better without the alias expansion too. Index: Functions/Prompts/prompt_bart_setup --- Functions/Prompts/prompt_bart_setup.~1.18.~ 2011-08-16 23:28:44.000000000 -0700 +++ Functions/Prompts/prompt_bart_setup 2011-08-29 08:38:17.000000000 -0700 @@ -70,7 +70,7 @@ 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 @@ then PSCMD=$jobtexts[%?$2] else - PSCMD=$2 + # Use history text to avoid alias expansion + PSCMD=$history[$HISTCMD] fi return 0 } -- Barton E. Schaefer