summaryrefslogtreecommitdiffstats
path: root/shell-completion
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-10-14 03:42:25 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-10-14 10:39:38 +0200
commitf80d6b93047cfeef594a39462576fc2309a654ac (patch)
treeed2b09ef710c5363f949beeb836daed40d7ace2c /shell-completion
parentMerge pull request #34730 from yuwata/boot-efi-follow-ups (diff)
downloadsystemd-f80d6b93047cfeef594a39462576fc2309a654ac.tar.xz
systemd-f80d6b93047cfeef594a39462576fc2309a654ac.zip
bash-completion/busctl: support wait command
Follow-up for 30465af656a10c124e7fa9fb33f7ad8454e9af2e.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/busctl13
1 files changed, 13 insertions, 0 deletions
diff --git a/shell-completion/bash/busctl b/shell-completion/bash/busctl
index ea88cca8c6..441b2c7d43 100644
--- a/shell-completion/bash/busctl
+++ b/shell-completion/bash/busctl
@@ -128,6 +128,7 @@ _busctl() {
[OBJECT]='introspect'
[METHOD]='call'
[EMIT]='emit'
+ [WAIT]='wait'
[PROPERTY_GET]='get-property'
[PROPERTY_SET]='set-property'
)
@@ -174,6 +175,18 @@ _busctl() {
fi
elif __contains_word "$verb" ${VERBS[EMIT]}; then
comps=''
+ elif __contains_word "$verb" ${VERBS[WAIT]}; then
+ if [[ $n -eq 1 ]] ; then
+ comps=$( __get_busnames $mode)
+ elif [[ $n -eq 2 ]] ; then
+ comps=$( __get_objects $mode ${COMP_WORDS[COMP_CWORD-1]})
+ elif [[ $n -eq 3 ]] ; then
+ comps=$( __get_interfaces $mode ${COMP_WORDS[COMP_CWORD-2]} ${COMP_WORDS[COMP_CWORD-1]})
+ elif [[ $n -eq 4 ]] ; then
+ comps=$( __get_members $mode ${COMP_WORDS[COMP_CWORD-3]} ${COMP_WORDS[COMP_CWORD-2]} ${COMP_WORDS[COMP_CWORD-1]} signal)
+ else
+ comps=''
+ fi
elif __contains_word "$verb" ${VERBS[PROPERTY_GET]}; then
if [[ $n -eq 1 ]] ; then
comps=$( __get_busnames $mode)