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

Re: (j.|.)




On 2023-01-31 17:33, Lawrence Velázquez wrote:

I don't know you're talking about.  Just run "man zshexpn" and
search for "x|y".  (You might have to escape the "|".  Alternately,
search for "Glob Operators" and find it by eye.)
I can find it by eye.  Yeah with man: 'x\|y' works, but I was using info and it doesn't work. Never mind.

The flag is not limited to associative arrays.

	% foo=axaybxby
	% print ${foo[(I)a?]}
	3
	% bar=(ax ay bx by)
	% print ${bar[(I)a?]}
	2
	% typeset -A baz=(ax 1 ay 2 bx 3 by 4)
	% print ${baz[(I)a?]}
	ax ay

Cool.  So much power!






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