summaryrefslogtreecommitdiff
path: root/contrib/bash-completion
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bash-completion')
-rw-r--r--contrib/bash-completion18
1 files changed, 16 insertions, 2 deletions
diff --git a/contrib/bash-completion b/contrib/bash-completion
index 4de384a2..818ff634 100644
--- a/contrib/bash-completion
+++ b/contrib/bash-completion
@@ -78,6 +78,13 @@ __enabled_extension() {
[[ " ${disabled} " != *" ${installed} "* ]] && printf "${installed} "
done)" -- $cur ) )
}
+__archive() {
+ COMPREPLY=( $( compgen -W "$( case $prev in
+ --archive) printf 'a h d e l p s u ';;
+ *) _filedir;;
+ esac)" -- $cur ) )
+}
+
_dwb() {
local cur prev opts lopts
@@ -127,7 +134,7 @@ _dwbem() {
opts="-h -a -b -B -c -d -e -E -i -I -l -L -n -N -r -p -u -U"
lopts="--help --list-all --bind --setbind --config --disable --enable --edit
--install --info --list-installed --setload --no-config --no-confirm
- --remove --proxy --upgrade --update"
+ --remove --proxy --upgrade --update --archive"
extinstops=" -B --setbind -c --config -d --disable -e --enable -E --edit
-L --setload -r --remove -U --update "
@@ -141,6 +148,10 @@ _dwbem() {
__disabled_extension
return 0
}
+ [[ " --archive " == *" ${prev} "* ]] && {
+ __archive
+ return 0
+ }
[[ "${extinstops}" == *" ${prev} "* ]] && {
__installed_extension
return 0
@@ -154,9 +165,12 @@ _dwbem() {
--*)
COMPREPLY=( $( compgen -W "${lopts}" -- $cur ) )
return 0;;
- *)
+ -*)
COMPREPLY=( $( compgen -W "${opts} ${lopts}" -- $cur ) )
return 0;;
+ *)
+ _filedir
+ return 0;;
esac
} &&
complete -F _dwbem dwbem