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

Re: part of an associativz array



On Mar 31, 10:35pm, Marc Chantreux wrote:
}
} something like : 
} 
} $user[login,uid]
} 
} any idea ?

    ${(v)user[(I)(login|uid)]}

However, you get them in the indeterminate order in which they appear
in the hash, rather than in the order given in the pattern.  To get
them in predictable order, you need something a lot uglier, like

    ${(e):-\$user\[{login,uid}\]}



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