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

Advanced option parsing across zsh commands



Hello,
This will bind to current keymap, not to "a":

% bindkey -N a main
% bindkey -s '^[t' 'echo test' -M a

I like zparseopts because of -E option, which allows to mix options
with strings and handles --. Is it expected that one day zsh will do
the same? It's a matter of providing one well written options parsing
function, isn't it.

That said, following zparseopts apparently fails:

% set -- a -b something -- -c
% typeset -A opts
% zparseopts -A opts -DE b: c
% echo "${(kv)opts}"

% # $1, $2, ... $5 are still the same

I once (12 years ago) used zparseopts this way and it worked great.
The call had to be different then.

Best regards,
Sebastian Gniazdowski



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