From d1fc3aec4c7f7bab30f8ad7dabd7832c7c8570e6 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 25 Sep 2011 14:32:15 -0400 Subject: bash_completion: add completion for pacman-key Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- contrib/bash_completion.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'contrib') diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in index ef04d5e1..78bde21d 100644 --- a/contrib/bash_completion.in +++ b/contrib/bash_completion.in @@ -27,6 +27,21 @@ _arch_incomp() { local r="\s-(-${1#* }\s|\w*${1% *})"; [[ $COMP_LINE =~ $r ]] } +_pacman_key() { + local cur opts prev + COMPREPLY=() + _get_comp_words_by_ref cur prev + if [[ $cur = -* && + $prev != -@(a|-add|c|-config|g|-gpgdir|h|-help|import?(-trustdb)) ]]; then + opts=('add delete export finger help list-keys recv-keys updatedb verify version + config edit-key gpgdir import import-trustdb init keyserver list-sigs + lsign-key populate refresh-keys' + 'a d e f h l r u v V') + _arch_ptr2comp opts + fi + true +} + _makepkg() { local cur opts prev COMPREPLY=() @@ -109,5 +124,6 @@ else fi complete -F _makepkg -o default makepkg +complete -F _pacman_key -o default pacman-key # ex:et ts=2 sw=2 ft=sh -- cgit v1.2.3-70-g09d2