* Writing a completion using _values with suffix options
@ 2015-10-06 21:58 zv
0 siblings, 0 replies; only message in thread
From: zv @ 2015-10-06 21:58 UTC (permalink / raw)
To: zsh-users
In the process of writing completions for the linux /libcap/ tool chain,
I ran across a completion scripting complication that has had me
docsnarfing for some time:
libcap binaries accept a comma delimited list of capabilities in
/cap_from_text(3)/ format as a parameter, e.g
> setcap cap_sys_audit,cap_net_raw,cap_sys_chgid=ep
The /_values/ utility builtin is very useful for completing the
capabilities themselves, but I cannot find a builtin that cleanly
handles the Unix style-options suffix (the terminating =e|i|p) WITHOUT
manually processing the current completion string (say, by processing
$PREFIX & $IPREFIX after setting /compset -P/).
Could this be done with an /_arguments/ spec or /_alternative/ or is
there another way to do this cleanly?
- zv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-06 22:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-06 21:58 Writing a completion using _values with suffix options zv
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).