summaryrefslogtreecommitdiff
path: root/contrib/pass.bash-completion
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-09-22 18:43:16 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-09-22 18:43:16 +0200
commitbad8bfc9bec16d27cfd53ae1a2d3ced10aa13966 (patch)
tree5626d615d168566b21900b6fab9a2c74f8a98860 /contrib/pass.bash-completion
parent74815d52ccf0c0623fbb41dfad4a9978bb9a2986 (diff)
downloadpass-bad8bfc9bec16d27cfd53ae1a2d3ced10aa13966.tar.gz
pass-bad8bfc9bec16d27cfd53ae1a2d3ced10aa13966.tar.bz2
pass-bad8bfc9bec16d27cfd53ae1a2d3ced10aa13966.zip
Vastly simplify GPG secret key finding logic.
- Only use secret keys - Use entire UID - --with-colons makes parsing easy
Diffstat (limited to '')
-rw-r--r--contrib/pass.bash-completion2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pass.bash-completion b/contrib/pass.bash-completion
index 1b9e20e..5b05f12 100644
--- a/contrib/pass.bash-completion
+++ b/contrib/pass.bash-completion
@@ -40,7 +40,7 @@ _pass_complete_entries () {
_pass_complete_keys () {
local IFS=$'\n'
# Extract names and email addresses from gpg --list-keys
- local keys="$(gpg --list-keys | grep uid | sed -e 's/uid *\([^<]*\)\(<\(.*\)>\)\?/\1\n\3/' | sed -e 's/\(^ *\| *$\)//g')"
+ local keys="$(gpg --list-secret-keys --with-colons | cut -d : -f 10 | sort -u | sed '/^$/d')"
COMPREPLY+=($(compgen -W "${keys}" -- ${cur}))
}
class='deletions'>-394/+477 2008-01-14 r605@Devoty: necoro | 2008-01-14 11:43:34 +0100Necoro2-26/+129 2008-01-14 r603@Devoty: necoro | 2008-01-14 11:30:26 +0100Necoro4-26/+38 2008-01-11 r598@Devoty: necoro | 2008-01-10 16:36:29 +0100Necoro4-10/+50 2008-01-11 r597@Devoty: necoro | 2008-01-10 14:12:35 +0100Necoro1-3/+3 2008-01-10 r595@Devoty: necoro | 2008-01-10 04:04:15 +0100Necoro1-52/+3 2008-01-09 r586@Devoty: necoro | 2008-01-09 14:54:18 +0100Necoro1-1/+1 2007-12-06 r577@Devoty: necoro | 2007-12-06 20:37:36 +0100Necoro1-1/+1 2007-12-06 r572@Devoty: necoro | 2007-11-28 08:48:15 +0100Necoro1-0/+1 2007-11-27 r570@Devoty: necoro | 2007-11-27 02:08:21 +0100Necoro3-84/+108