From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: ${(P)${foo}} (Re: Associative array ordering)
Date: Wed, 3 Feb 1999 11:06:59 +0100 (MET) [thread overview]
Message-ID: <199902031006.LAA10917@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Wed, 3 Feb 1999 10:55:43 +0100 (MET)
I wrote:
> Bart Schaefer wrote:
>
> > Let's go this way: Implement ${(P)foo}, the same as ${(P)${foo}} where
> > the inner ${...} has no flags or modifiers, and leave ${!foo} undefined
> > until we do real namerefs (if we ever do).
>
> Yep.
I forgot to append the patch for the docs, sorry.
Bye
Sven
--- od/Zsh/expn.yo Wed Feb 3 08:46:59 1999
+++ Doc/Zsh/expn.yo Wed Feb 3 11:06:10 1999
@@ -525,13 +525,13 @@
nested but too deep recursion may have unpredictable effects.
)
item(tt(P))(
-If used with a parameter name, this flag has no effect. But if it is
-used with a tt(${)...tt(}) type parameter expression or a
-tt($LPAR())...tt(RPAR()) type command substitution in place of
-the parameter name this flag makes the result of the expansion be
-taken as a parameter name which is then used. E.g. if you have
-`tt(foo=bar)' and `tt(bar=baz)', the string `tt(${(P)${foo}})' will be
-expanded to `tt(baz)'.
+This makes the value of the parameter var(name) be taken as a
+parameter name on which to work. If it is used with a tt(${)...tt(})
+type parameter expression or a tt($LPAR())...tt(RPAR()) type command
+substitution in place of the parameter name this flag makes the result
+of the expansion be taken as a parameter name which is then
+used. E.g. if you have `tt(foo=bar)' and `tt(bar=baz)', the strings
+`tt(${(P)foo}' and `tt(${(P)${foo}})' will be expanded to `tt(baz)'.
)
item(tt(o))(
Sort the resulting words in ascending order.
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-02-03 10:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-03 10:06 Sven Wischnowsky [this message]
1999-02-03 10:42 ` Peter Stephenson
-- strict thread matches above, loose matches on Subject: below --
1999-02-03 9:55 Sven Wischnowsky
1999-02-03 8:02 Sven Wischnowsky
1999-02-03 8:39 ` Bart Schaefer
1999-02-02 16:58 Associative array ordering and selective unset (Re: Example function) Sven Wischnowsky
1999-02-02 17:41 ` ${(P)${foo}} (Re: Associative array ordering) Bart Schaefer
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=199902031006.LAA10917@beta.informatik.hu-berlin.de \
--to=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).