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

Re: Array as parameter



On 2 November 2011 10:10, Stephane CHAZELAS <stephane_chazelas@xxxxxxxx> wrote:
> 2011-11-1, 22:00(-07), Wayne Davison:
>> However, if you need to be able to keep the array
>> parameter separate from other parameters, you could instead refer to the
>> variable whose name you passed in using ${(P)1} in your function in place
>> of the $1.
>
> Except that it doesn't work for arrays. You'd need to  use eval
> here.

(P) works perfectly fine with arrays.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author