zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@fysh.org>
To: wischnow@informatik.hu-berlin.de (Sven Wischnowsky)
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: new parameter flag?
Date: Tue, 31 Aug 1999 10:29:13 +0100 (BST)	[thread overview]
Message-ID: <E11LkE5-0003qY-00@crucigera.fysh.org> (raw)
In-Reply-To: <199908300939.LAA20676@beta.informatik.hu-berlin.de> from Sven Wischnowsky at "Aug 30, 1999 11:39:27 am"

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


  reply	other threads:[~1999-08-31 10:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-30  9:39 Sven Wischnowsky
1999-08-31  9:29 ` Zefram [this message]
1999-08-31 11:45 Sven Wischnowsky
1999-08-31 12:25 ` Zefram
1999-08-31 12:43 Sven Wischnowsky
1999-09-01  8:35 ` Peter Stephenson
1999-09-01  9:33 Sven Wischnowsky

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=E11LkE5-0003qY-00@crucigera.fysh.org \
    --to=zefram@fysh.org \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).