Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: use 'P' parameter expansion flag with array?
- X-seq: zsh-workers 27090
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh list <zsh-workers@xxxxxxxxxx>
- Subject: Re: use 'P' parameter expansion flag with array?
- Date: Sun, 05 Jul 2009 12:56:40 -0700
- In-reply-to: <200906300843.n5U8hecG011236@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <19017.33909.493608.356003@xxxxxxxxxxxxxxxxxx> <200906300843.n5U8hecG011236@xxxxxxxxxxxxxx>
On Jun 30, 9:43am, Peter Stephenson wrote:
}
} Greg Klanderman wrote:
} > If the 'P' parameter expansion flag is applied to an array parameter,
} > should it be applied to each of the elements?
}
} It does seem logical, but the code is obscure and it's not clear whether
} this was intended or not---it probably fell through the cracks.
The (P) flag was supposed to create an approximate equivalent of ksh
"nameref" parameters. Because of the way array expansion operates in
ksh and similar shells, extending (P) to an automatic "map" over an
array wasn't considered.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author