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

Curiosity: zstyle -a vs. zstyle -h



I just did a little experiment.  It appears that `zstyle -h pat style name'
is exactly equivalent to `typeset -A name; zstyle -a pat style name'.

This seems just a tad inconsistent; if `zstyle -h' is going to force the
name to be an associative array, shouldn't `zstyle -a' force the name to
be an ordinary array?  (And shouldn't it be -A rather than -h?  I thought
we only used -h when -A was already taken, as with `stat' (and there it's
-H).)

An equally good (perhaps even better) alternative would be to drop the -h
option entirely and require the array to be declared if one wants it to be
an assoc.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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