Added gpg2 completion (Closes: #489927)
This commit is contained in:
parent
a4ef62f4dc
commit
e1f39bd088
@ -39,10 +39,10 @@ fi
|
|||||||
|
|
||||||
# Alter the following to reflect the location of this file.
|
# Alter the following to reflect the location of this file.
|
||||||
#
|
#
|
||||||
[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/etc/bash_completion
|
#[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/etc/bash_completion
|
||||||
[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/etc/bash_completion.d
|
#[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/etc/bash_completion.d
|
||||||
#[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=$(pwd)/bash_completion
|
[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=$(pwd)/bash_completion
|
||||||
#[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=$(pwd)/contrib
|
[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=$(pwd)/contrib
|
||||||
readonly BASH_COMPLETION BASH_COMPLETION_DIR
|
readonly BASH_COMPLETION BASH_COMPLETION_DIR
|
||||||
|
|
||||||
# Set a couple of useful vars
|
# Set a couple of useful vars
|
||||||
|
41
contrib/gpg2
Normal file
41
contrib/gpg2
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# gpg2(1) completion
|
||||||
|
#
|
||||||
|
have gpg2 && {
|
||||||
|
_gpg2 ()
|
||||||
|
{
|
||||||
|
local cur prev
|
||||||
|
|
||||||
|
COMPREPLY=()
|
||||||
|
cur=`_get_cword`
|
||||||
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
|
case "$prev" in
|
||||||
|
--homedir)
|
||||||
|
_filedir -d
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-@(s|-sign|-clearsign|-options|-decrypt))
|
||||||
|
_filedir
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--@(export|@(?(l|nr|nrl)sign|edit)-key))
|
||||||
|
# return list of public keys
|
||||||
|
COMPREPLY=( $( compgen -W "$( gpg2 --list-keys 2>/dev/null | sed -ne 's@^pub.*/\([^ ]*\).*$@\1@p;s@^.*\(<\([^>]*\)>\).*$@\2@p')" -- "$cur" ))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-@(r|-recipient))
|
||||||
|
COMPREPLY=( $( compgen -W "$( gpg2 --list-keys 2>/dev/null | sed -ne 's@^.*<\([^>]*\)>.*$@\1@p')" -- "$cur" ))
|
||||||
|
if [ -e ~/.gnupg/gpg.conf ]; then
|
||||||
|
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$( sed -ne 's@^[ \t]*group[ \t][ \t]*\([^=]*\).*$@\1@p' ~/.gnupg/gpg.conf)" -- "$cur"))
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ "$cur" == -* ]]; then
|
||||||
|
COMPREPLY=( $( compgen -W '-s -b -e -c -d -k -K -a -r -u -z -o -v \
|
||||||
|
-n -N -i -h -R -t $(gpg2 --dump-options)' -- $cur ) )
|
||||||
|
fi
|
||||||
|
} &&
|
||||||
|
complete -F _gpg2 $default gpg2
|
||||||
|
}
|
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -26,9 +26,10 @@ bash-completion (200809xx) UNRELEASED; urgency=low
|
|||||||
- -@(r|-recipient))
|
- -@(r|-recipient))
|
||||||
* Added gksudo, gksu, kdesudo completion
|
* Added gksudo, gksu, kdesudo completion
|
||||||
* Added apache2ctl completion
|
* Added apache2ctl completion
|
||||||
|
* Added gpg2 completion (Closes: #489927)
|
||||||
* debian/links fixed (Closes: #494292)
|
* debian/links fixed (Closes: #494292)
|
||||||
|
|
||||||
-- David Paleino <d.paleino@gmail.com> Sat, 27 Sep 2008 12:04:42 +0200
|
-- David Paleino <d.paleino@gmail.com> Sat, 27 Sep 2008 12:23:51 +0200
|
||||||
|
|
||||||
bash-completion (20080705) unstable; urgency=low
|
bash-completion (20080705) unstable; urgency=low
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user