Subject: Advanced option parsing across zsh commands
From: Sebastian Gniazdowski <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Tue, 26 Jan 2016 10:20:49 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

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