* completion: option stacking and arguments!
@ 2015-10-16 7:53 Vincent Bernat
2015-10-16 21:46 ` Vincent Bernat
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Bernat @ 2015-10-16 7:53 UTC (permalink / raw)
To: zsh-users
Hey!
When using completion with "_arguments '-u=[Run as specified
user]:user:_users'", completing users after "-u" requires a space or an
equal sign. However, when enabling short option stacking with "-s", this
is not the case anymore.
How to still require a space/equal before a mandatory argument when
using option stacking?
Thanks!
--
Write clearly - don't sacrifice clarity for "efficiency".
- The Elements of Programming Style (Kernighan & Plauger)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: completion: option stacking and arguments!
2015-10-16 7:53 completion: option stacking and arguments! Vincent Bernat
@ 2015-10-16 21:46 ` Vincent Bernat
0 siblings, 0 replies; 2+ messages in thread
From: Vincent Bernat @ 2015-10-16 21:46 UTC (permalink / raw)
To: zsh-users
❦ 16 octobre 2015 09:53 +0200, Vincent Bernat <bernat@luffy.cx> :
> When using completion with "_arguments '-u=[Run as specified
> user]:user:_users'", completing users after "-u" requires a space or an
> equal sign. However, when enabling short option stacking with "-s", this
> is not the case anymore.
>
> How to still require a space/equal before a mandatory argument when
> using option stacking?
Also, even when the short argument is specified with "-l=-" (for
example), zsh still allows completion without any character (but
disallows completion with a space):
docker -Dlerr<tab> -> docker -Dlerror
docker -Dl=err<tab> -> docker -Dl=error
docker -Dl err<tab> -> docker -Dl err
The whole completion is available here:
https://github.com/felixr/docker-zsh-completion/
--
Localise input and output in subroutines.
- The Elements of Programming Style (Kernighan & Plauger)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-16 21:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-16 7:53 completion: option stacking and arguments! Vincent Bernat
2015-10-16 21:46 ` Vincent Bernat
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).