Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: use 'P' parameter expansion flag with array?



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