summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-03-07 10:43:40 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-03-07 10:43:40 +0000
commit318119bda7976a2b7ccb946cd460ab27bbb6efc3 (patch)
treec3c68f2ecdd587f7b7b1203ae13d5e7de38b8364 /Completion/Unix
parentd70cfd3310eab37534a601d954ff41fcf7cdf772 (diff)
downloadzsh-318119bda7976a2b7ccb946cd460ab27bbb6efc3.tar.gz
zsh-318119bda7976a2b7ccb946cd460ab27bbb6efc3.tar.xz
zsh-318119bda7976a2b7ccb946cd460ab27bbb6efc3.zip
Richard Hartmann: 24631: gpg completion update
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_gpg9
1 files changed, 5 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_gpg b/Completion/Unix/Command/_gpg
index 8028569b8..20167a847 100644
--- a/Completion/Unix/Command/_gpg
+++ b/Completion/Unix/Command/_gpg
@@ -19,7 +19,8 @@ _arguments -C -s -S -A "-*" \
   '--list-public-keys[list all public keys]' \
   '--list-secret-keys[list all secret keys]' \
   '--list-sigs[lists keys and signatures]:key attachment:->public-keys' \
-  '--check-sigs[lists key, signatures and check them]:key attachment:->public-keys' \
+  '--list-options[modify what the various --list-* commands show]' \
+  '--check-sigs[list key, signatures and check them]:key attachment:->public-keys' \
   '--fingerprint[list all keys with their fingerprints]:key attachment:->public-keys' \
   '--list-packets[list only the sequence of packets]' \
   '--gen-key[generate a new pair key]' \
@@ -130,7 +131,7 @@ _arguments -C -s -S -A "-*" \
   '*:args:->args' && ret=0
 
 if [[ $state = args ]]; then
-  if (( ${+opt_args[--export]} || ${+opt_args[--list-keys]} )); then
+  if (( ${+opt_args[--export]} || ${+opt_args[--list-keys]} || ${+opt_args[--list-public-keys]} )); then
     state=public-keys
   elif (( ${+opt_args[--list-secret-keys]} )); then
     state=secret-keys
@@ -159,11 +160,11 @@ fi
 case "$state" in
   public-keys)
     _wanted public-keys expl 'public key' \
-	compadd ${${(Mo)$(_call_program public-keys gpg $needed --list-keys 2>/dev/null):%<*>}//(<|>)/} && return
+	compadd ${${(Mo)$(_call_program public-keys gpg $needed --list-public-keys --list-options no-show-photos 2>/dev/null):%<*>}//(<|>)/} && return
   ;;
   secret-keys)
     _wanted secret-keys expl 'secret key' compadd \
-	${${(Mo)$(_call_program secret-keys gpg $needed --list-secret-keys 2>/dev/null):%<*>}//(<|>)/} && return
+	${${(Mo)$(_call_program secret-keys gpg $needed --list-secret-keys --list-options no-show-photos 2>/dev/null):%<*>}//(<|>)/} && return
   ;;
   ciphers)
     _wanted ciphers expl cipher compadd \