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

Re: Processing Arguments



On Dec 3,  4:49pm, danielwallace wrote:
} 
} Try looking up zparseopts. It is along the same lines as bush's getopts.

Is "bush" a typo, or yet another shell I've never heard of?

zsh has "getopts" as well as "zparseopts".  The syntax of zparseopts is
a bit harder to understand, but it loops over the entire argument list
for you and stuffs values into arrays or associative arrays, whereas
with getopts you write your own loop (usually "while getopts ...").



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