* [PATCH] Completion: Fix _wajig
@ 2018-06-22 15:59 dana
0 siblings, 0 replies; only message in thread
From: dana @ 2018-06-22 15:59 UTC (permalink / raw)
To: Zsh workers
Someone on /r/zsh complained that wajig sub-commands don't complete. There must
have been an output format change some time ago.
This updates the function to account for the format change, and also improves
the description capitalisation and escaping.
dana
diff --git a/Completion/Debian/Command/_wajig b/Completion/Debian/Command/_wajig
index 26d08cfd7..630507e67 100644
--- a/Completion/Debian/Command/_wajig
+++ b/Completion/Debian/Command/_wajig
@@ -14,7 +14,8 @@ _arguments -C -s \
case $state in
cmds)
- cmds=( ${${(M)${(f)"$(wajig commands 2>/dev/null)"}:# [^-]*}/(#b) ([^ ]#) #(*)/$match[1]:$match[2]:l} )
+ cmds=( ${(f)"$( _call_program commands $words[1] commands )"} )
+ cmds=( ${(@)cmds/(#b)([^ ]##) ##(?)(*)/$match[1]:${match[2]:l}${match[3]//:/\\:}} )
_describe -t commands 'wajig command' cmds && ret=0
;;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-22 15:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22 15:59 [PATCH] Completion: Fix _wajig dana
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).