Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[Patch] Fix for functions/Completion/Unix/_gpg
- X-seq: zsh-workers 24631
- From: "Richard Hartmann" <richih.mailinglist@xxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxx>
- Subject: [Patch] Fix for functions/Completion/Unix/_gpg
- Date: Fri, 29 Feb 2008 15:36:27 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=7TS6kghGqF4FPQzS6lfTzL7bObqJNTFsSBu1WXWk1Ho=; b=TVuWJTD4KyOAJTX5T23czb+lzMyrLCl4VyeQlHpcbXhCO3Hr9iqRf08pFtfjGJPG87iYt/OiLvWZWlzlEsxKK5suANkAzEkqtSYamx4HsYcd88Bqs4EucAYANwvSfLNFDqa4TDAH1jyeq+6mZGGZPE2ysg33OqY5a56IjQmF5sU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=LFjHFYfU7B0SHoyxZ1FX4lPIL8CIT00k+QfIJsDglt/mfOCieGYELzWkkGxUl1CfyE7aAlerC25HL7VvUDmsPWWN4JU6dajGgF9nxEmXX+rPmJAobHLeSY5sSOuP12DNfKT84AUGYEpj5F1RNXB8m7699gVE+tFl+EJMlGKUQWA=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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
--- /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 \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author