Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
use 'P' parameter expansion flag with array?
- X-seq: zsh-workers 27072
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: Zsh list <zsh-workers@xxxxxxxxxx>
- Subject: use 'P' parameter expansion flag with array?
- Date: Mon, 29 Jun 2009 23:20:21 -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: gak@xxxxxxxxxxxxxx
If the 'P' parameter expansion flag is applied to an array parameter,
should it be applied to each of the elements? Seems like it should,
but it doesn't seem to be:
[~] greg@lwm| zsh -f
lwm%
lwm% echo $ZSH_VERSION
4.3.10-dev-1
lwm% foo=(bar baz)
lwm% bar=10
lwm% baz=35
lwm% echo ${(P)foo}
10
lwm% echo ${(P@)foo}
10
lwm% echo ${(P)foo[@]}
10
lwm%
thanks,
Greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author