In zsh, how do I pass anonymous arrays into functions?

Posted by someguy on Stack Overflow See other posts from Stack Overflow or by someguy
Published on 2009-01-14T05:28:23Z Indexed on 2010/05/18 16:00 UTC
Read the original article Hit count: 169

Filed under:

e.g. looking for something like:

foo() { echo ${1[2]} '\n'; }

a=(abc def ghi) foo $a

--> def

Or ideally:

foo (abc def ghi)

© Stack Overflow or respective owner

Related posts about zsh