Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Completion: Fix _wajig
- X-seq: zsh-workers 43088
- From: dana <dana@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: [PATCH] Completion: Fix _wajig
- Date: Fri, 22 Jun 2018 10:59:07 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=Acw+bc7iW++1aahu1WM5fTb5gTWm3IO0jG3S6tSEdBo=; b=evqOrwITnNK5+FcijgSzExoORjk+2SeQvIb2qmI1PdVJbRJvseE7/i/tmNNh6uBUvR vpkQyEq0mcoILoSusb/lfNWPLFpc6MP3Cok5IsSAGH7uI+nJ3E8TQZTXEpXoCZF9H8Cb 6qD0M7jMxf55dZa0z6ioDgOhBxmWEUZAQ5AfRrXfWsM5KCvM5O9ip8VveC4QT8Oq29dt C+7cr+ePEOQUHdw4rTe9WBAs+UyEOode/xmwWFk53xhxLMCp0/en5Q/TFxCsFi/OrY5w +jSKfK1oF7Vyb0T6MFIJiD8f9T6nSJck9u2tuJlBFY2VjhZ7jd93A3rvj9CuPI7rCUB4 erXA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
;;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author