1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

zsh-completion: Allow use of names in pacman-key

With pacman-key now having the ability to use names in --list-keys etc,
we can remove the comments that temporarily blocked this in the zsh
completion file.

Signed-off-by: Daniel Wallace <daniel.wallace@gatech.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Daniel Wallace 2012-06-19 19:03:58 -04:00 committed by Dan McGee
parent 12866ba791
commit 377cc23a09

View File

@ -420,12 +420,11 @@ _keys() {
if (match($NF, /<[^>]+>/)) if (match($NF, /<[^>]+>/))
print substr($NF, RSTART + 1, RLENGTH - 2) print substr($NF, RSTART + 1, RLENGTH - 2)
#this adds support for names as well if that is ever added #this adds support for names as well if that is ever added
# } }
#$1 == "uid" { $1 == "uid" {
#for (i=2;i<NF;i++) {printf "%s%s",sep, $i;sep=" "}; printf "\n" for (i=2;i<NF;i++) {printf "%s%s",sep, $i;sep=" "}; printf "\n"
}' #|sed -e 's/(.*)//g' -e 's/^\ //g' -e 's/\ *$//g' |uniq }' |sed -e 's/(.*)//g' -e 's/^\ //g' -e 's/\ *$//g' |uniq
) )
#keys=(${keylist//$'\n'/\/})
keys=(${(s:/:)${keylist//$'\n'/\/}}) keys=(${(s:/:)${keylist//$'\n'/\/}})
_describe -t modules 'keys in keyring' keys && return 0 _describe -t modules 'keys in keyring' keys && return 0
} }