zsh-workers
 help / color / mirror / code / Atom feed
* Advanced option parsing across zsh commands
@ 2016-01-26  9:20 Sebastian Gniazdowski
  2016-01-26 18:28 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Gniazdowski @ 2016-01-26  9:20 UTC (permalink / raw)
  To: Zsh hackers list

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-27  7:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-26  9:20 Advanced option parsing across zsh commands Sebastian Gniazdowski
2016-01-26 18:28 ` Bart Schaefer
2016-01-26 18:59   ` Sebastian Gniazdowski
2016-01-26 19:09     ` Sebastian Gniazdowski
2016-01-27  7:07       ` Bart Schaefer
2016-01-27  6:56     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).