From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19351 invoked from network); 31 Aug 1999 10:05:13 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Aug 1999 10:05:13 -0000 Received: (qmail 8562 invoked by alias); 31 Aug 1999 09:37:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7569 Received: (qmail 8548 invoked from network); 31 Aug 1999 09:37:44 -0000 Subject: Re: PATCH: new parameter flag? In-Reply-To: <199908300939.LAA20676@beta.informatik.hu-berlin.de> from Sven Wischnowsky at "Aug 30, 1999 11:39:27 am" To: wischnow@informatik.hu-berlin.de (Sven Wischnowsky) Date: Tue, 31 Aug 1999 10:29:13 +0100 (BST) Cc: zsh-workers@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL48 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram 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