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

Re: Advanced option parsing across zsh commands



Here is how it works if order of option specification is changed:

% unset opts
% unset optsa
% typeset -A opts
% typeset -a optsa
% set -- a -b something -+X -- -c
% zparseopts -a optsa -A opts -D -E +: b: c
% echo "${(k)opts}"
-b -
% echo "${(v)opts}"
something +X
% echo "${opts[-]}"
+X
% echo $optsa
-b something - +X

That's quite a work around, but I wonder what's going on internally?
Tested (the previous runs too) on 5.2

Best regards,
Sebastian Gniazdowski



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