mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 07:48:50 -05:00
bash_completion: complete pacman-key options right away
pacman-key requires at least one dashed option, so complete them right away, rather than falling back to default completion. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
e66edf817b
commit
c571bd7afb
@ -31,12 +31,14 @@ _pacman_key() {
|
|||||||
local cur opts prev
|
local cur opts prev
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
_get_comp_words_by_ref cur prev
|
_get_comp_words_by_ref cur prev
|
||||||
if [[ $cur = -* &&
|
opts=('add delete export finger help list-keys recv-keys updatedb verify
|
||||||
$prev != -@(a|-add|c|-config|g|-gpgdir|h|-help|import?(-trustdb)) ]]; then
|
version config edit-key gpgdir import import-trustdb init keyserver
|
||||||
opts=('add delete export finger help list-keys recv-keys updatedb verify version
|
list-sigs lsign-key populate refresh-keys'
|
||||||
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')
|
'a d e f h l r u v V')
|
||||||
|
if [[ $prev = 'pacman-key' ]]; then
|
||||||
|
_arch_ptr2comp opts
|
||||||
|
elif [[ $cur = -* &&
|
||||||
|
$prev != -@(a|-add|c|-config|g|-gpgdir|h|-help|import?(-trustdb)) ]]; then
|
||||||
_arch_ptr2comp opts
|
_arch_ptr2comp opts
|
||||||
fi
|
fi
|
||||||
true
|
true
|
||||||
|
Loading…
Reference in New Issue
Block a user