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

Properties of special hashes in zsh/parameter module



Some of the special parameters in zsh/parameter are referenced as read-only
hashes.  The normal properties of assocative arrays imply that if you refer
to all the values in one of these hashes, e.g. ${history[*]}, that they may
be returned in any order.

In practice these special hashes don't use a hash table implementation and
the order of values is guaranteed to be fixed, and in the case of $history
are guaranteed to be in the same order as $(history -rn 1).

Should we document this and make it a reliable condition for scripting?  Or
do we prefer to keep open the option of implementing atop an unordered hash
at some point in the future?



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