Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: completion for gpg not working



On 15 March 2011 23:34, Philipp Hartwig <philipp.hartwig@xxxxxxxxxx> wrote:
> Hello,
>
> I'm using zsh 4.3.11-4 from Debian.
>
> With zsh -f and then
>
> $ autoload -Uz compinit
> $ compinit
> $ zstyle ':completion:*' completer _complete _approximate
>
> typing
>
> $ gpg --ver<tab>
>
> "completes" to
>
> $ gpg --armor
> zsh: do you wish to see all 217 possibilities (78 lines)?
>
> The _gpg completion file distributed with Debian is identical to the one
> distributed with the official Zsh 4.3.11.
>
> It would be great if this could be fixed.


http://cgit.mika.l3ib.org/cgit/zsh-cvs/patch/?id=223537ef09490f5fdeba8941a058047755c658cf

diff --git a/Completion/Unix/Command/_gpg b/Completion/Unix/Command/_gpg
index 3f86411..3043f7a 100644
--- a/Completion/Unix/Command/_gpg
+++ b/Completion/Unix/Command/_gpg
@@ -193,15 +193,15 @@ gpgextra=('--decrypt-files[decrypt multiple files]'

 case "$service" in
   gpg)
-    _arguments -C -s -S -A "-*" $gpgbasic $gpgextra $gpgv '*:args:->args'
+    _arguments -C -s -S -A "-*" $gpgbasic $gpgextra $gpgv
'*:args:->args' && ret=0
     ;;

   gpgv)
-    _arguments -C -s -S -A "-*" $gpgv '*:args:->args'
+    _arguments -C -s -S -A "-*" $gpgv '*:args:->args' && ret=0
     ;;

   gpg-zip)
-    _arguments -C -s -S -A "-*" $gpgbasic $gpgzip '*:args:->args'
+    _arguments -C -s -S -A "-*" $gpgbasic $gpgzip '*:args:->args' && ret=0
     ;;
 esac

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author