From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes Date: Wed, 3 Feb 1999 11:06:59 +0100 (MET) Message-Id: <199902031006.LAA10917@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Wed, 3 Feb 1999 10:55:43 +0100 (MET) Subject: Re: ${(P)${foo}} (Re: Associative array ordering) X-Mailing-List: 5200 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