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

Re: Expand each array element with ${(P)...}



On Tue, Feb 6, 2024, at 2:25 AM, Roman Perepelitsa wrote:
> I don't know if there is a better way.

I'm not sure there is.  If you nest (P) to delay its application,
the shell explicitly complains about the very thing Marlon wants
to do:

	% names=(a b c)
	% : ${${(P)names}}
	zsh: parameter name reference used with array

-- 
vq




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