Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: new parameter flag?
- X-seq: zsh-workers 7569
- From: Zefram <zefram@xxxxxxxx>
- To: wischnow@xxxxxxxxxxxxxxxxxxxxxxx (Sven Wischnowsky)
- Subject: Re: PATCH: new parameter flag?
- Date: Tue, 31 Aug 1999 10:29:13 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <199908300939.LAA20676@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> from Sven Wischnowsky at "Aug 30, 1999 11:39:27 am"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Sven Wischnowsky wrote:
>This adds the `%' flag to parameter expansion. It makes the result of
>the expansion undergo prompt expansion.
Yes! I've wanted this for the built-in strftime, in all the daemons I've
ever written in zsh. (print -P has some other undesirable semantics.)
>+item(tt(%))(
>+Expand all tt(%) escapes in the resulting words in the same way as in
>+prompts (see noderef(Prompt Expansion)).
>+)
Actually I think it'll do full prompt expansion, affected by the options
PROMPT_EXPAND, PROMPT_BANG and PROMPT_PERCENT. It would be nice to
have another flag to do just % sequences, i.e., do prompt expansion with
options NO_PROMPT_EXPAND, NO_PROMPT_BANG and PROMPT_PERCENT temporarily
set. Say, (%) for just % sequences, and (%%) for full prompt expansion.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author