From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Prompt theme: Show the original job text after foregrounding
Date: Mon, 29 Aug 2011 08:44:25 -0700 [thread overview]
Message-ID: <110829084425.ZM32208@torch.brasslantern.com> (raw)
In-Reply-To: <CACeGjnVQyAXe1z12w8Fupp4NHG0_TuQLcp4KsZBkB_fKMK-oEw@mail.gmail.com>
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
prev parent reply other threads:[~2011-08-29 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 6:05 Bart Schaefer
2011-08-28 16:16 ` Vin Shelton
2011-08-29 15:44 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=110829084425.ZM32208@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).