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

Associative array sorting



I was just looking at this in the manual --

a
     Sort in array index order; when combined with 'O' sort in reverse
     array index order.  Note that 'a' is therefore equivalent to the
     default but 'Oa' is useful for obtaining an array's elements in
     reverse order.

Like (o), (a) applies after the param is turned into an ordinary
array, so "equivalent to the default" kind of gets us off the hook,
but this would be the obvious place to attach sorting the associative
array by key rather than by raw hash traversal.




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