summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-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}))
}