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

Re: The amazing array feature in zsh



On 8/15/06, sac <sac_urs@xxxxxxxxxxx> wrote:
...
I dont know if any other shell provides similar
feature, but this one is too good and useful, and
makes the use of array in shell very easy. But I dont
think this is documented in zsh, atleast I couldn't
find it.

Regards
sac.


it's mentioned briefly in the Array Parameters section of zshparam(1).
I agree that it's useful and maybe not obvious enough in the
documentation; I find it especially useful with the path variable.
When you look at the baroque suites of functions bash users are
constantly reimplementing and filling global dotfiles with to build up
PATH without duplicates, you realize how much more attractive the zsh
option is:

typeset -U path
path+=(~/bin /sw/bin /opt/local/bin)



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