zsh-workers
 help / color / mirror / code / Atom feed
* [Patch] Fix for functions/Completion/Unix/_gpg
@ 2008-02-29 14:36 Richard Hartmann
  2008-03-03 12:12 ` Richard Hartmann
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Hartmann @ 2008-02-29 14:36 UTC (permalink / raw)
  To: Zsh hackers list

[-- 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 \

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch] Fix for functions/Completion/Unix/_gpg
  2008-02-29 14:36 [Patch] Fix for functions/Completion/Unix/_gpg Richard Hartmann
@ 2008-03-03 12:12 ` Richard Hartmann
  2008-03-03 12:41   ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Hartmann @ 2008-03-03 12:12 UTC (permalink / raw)
  To: Zsh hackers list

Sorry for replying to myself, but are completion scripts maintained
somewhere else? If not, I would appreciate feedback on needed changes to
get this accepted :)


Richard


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch] Fix for functions/Completion/Unix/_gpg
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Stephenson @ 2008-03-03 12:41 UTC (permalink / raw)
  To: Zsh hackers list

On Mon, 3 Mar 2008 13:12:24 +0100
"Richard Hartmann" <richih.mailinglist@gmail.com> wrote:
> Sorry for replying to myself, but are completion scripts maintained
> somewhere else? If not, I would appreciate feedback on needed changes to
> get this accepted :)

This is the right place, but there are so many completion functions for so
many things that it relies on someone knows the command in question to
check it's doing the right thing... I think there are some gpg users
around.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch] Fix for functions/Completion/Unix/_gpg
  2008-03-03 12:41   ` Peter Stephenson
@ 2008-03-03 14:28     ` Richard Hartmann
  2008-03-07 10:44     ` Peter Stephenson
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Hartmann @ 2008-03-03 14:28 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

On Mon, Mar 3, 2008 at 1:41 PM, Peter Stephenson <pws@csr.com> wrote:

>  This is the right place, but there are so many completion functions for so
>  many things that it relies on someone knows the command in question to
>  check it's doing the right thing... I think there are some gpg users
>  around.

OK, no worries, then. In case there are no takers, I can walk you through
some tests to ensure this in no time, as well.

That being said, this is a Call For Testers :)


Richard


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Patch] Fix for functions/Completion/Unix/_gpg
  2008-03-03 12:41   ` Peter Stephenson
  2008-03-03 14:28     ` Richard Hartmann
@ 2008-03-07 10:44     ` Peter Stephenson
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2008-03-07 10:44 UTC (permalink / raw)
  To: Zsh hackers list

On Mon, 3 Mar 2008 12:41:07 +0000
Peter Stephenson <pws@csr.com> wrote:
> On Mon, 3 Mar 2008 13:12:24 +0100
> "Richard Hartmann" <richih.mailinglist@gmail.com> wrote:
> > Sorry for replying to myself, but are completion scripts maintained
> > somewhere else? If not, I would appreciate feedback on needed changes to
> > get this accepted :)
> 
> This is the right place, but there are so many completion functions for so
> many things that it relies on someone knows the command in question to
> check it's doing the right thing... I think there are some gpg users
> around.

If that fails, Plan B is to commit it anyway and see who squeals.  I've
done that.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-07 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 14:36 [Patch] Fix for functions/Completion/Unix/_gpg Richard Hartmann
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

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).