zsh-workers
 help / color / mirror / code / Atom feed
From: "Richard Hartmann" <richih.mailinglist@gmail.com>
To: "Zsh hackers list" <zsh-workers@sunsite.dk>
Subject: [Patch] Fix for functions/Completion/Unix/_gpg
Date: Fri, 29 Feb 2008 15:36:27 +0100	[thread overview]
Message-ID: <2d460de70802290636x1c498903k317e906b8cf687e@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

Hi all,

attached is a patch that fixes showing all photos from all
locally stored keys when trying to complete. It also fixes
a grammar error and introduces new completion help.


Richard

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: _gpg.diff --]
[-- Type: text/x-diff; name=_gpg.diff, Size: 1878 bytes --]

--- /home/richih/work/MISC/zsh/_gpg.orig	2008-02-29 15:21:52.276240652 +0100
+++ /usr/share/zsh/4.3.4/functions/Completion/Unix/_gpg	2008-02-29 15:32:09.311403482 +0100
@@ -19,7 +19,8 @@
   '--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 @@
   '*: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 @@
 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 \

             reply	other threads:[~2008-02-29 14:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 14:36 Richard Hartmann [this message]
2008-03-03 12:12 ` Richard Hartmann
2008-03-03 12:41   ` Peter Stephenson
2008-03-03 14:28     ` Richard Hartmann
2008-03-07 10:44     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d460de70802290636x1c498903k317e906b8cf687e@mail.gmail.com \
    --to=richih.mailinglist@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).