mirror of
https://github.com/systemd/systemd.git
synced 2025-01-03 05:18:09 +03:00
bash-completion: busctl: add 'emit' command support
This commit is contained in:
parent
0747cde76c
commit
23bedfbc32
@ -86,7 +86,8 @@ _busctl() {
|
|||||||
-q --quiet --verbose --expect-reply=no --auto-start=no
|
-q --quiet --verbose --expect-reply=no --auto-start=no
|
||||||
--allow-interactive-authorization=no --augment-creds=no
|
--allow-interactive-authorization=no --augment-creds=no
|
||||||
--watch-bind=yes -j'
|
--watch-bind=yes -j'
|
||||||
[ARG]='--address -H --host -M --machine --match --timeout --size --json'
|
[ARG]='--address -H --host -M --machine --match --timeout --size --json
|
||||||
|
--destination'
|
||||||
)
|
)
|
||||||
|
|
||||||
if __contains_word "--user" ${COMP_WORDS[*]}; then
|
if __contains_word "--user" ${COMP_WORDS[*]}; then
|
||||||
@ -106,6 +107,9 @@ _busctl() {
|
|||||||
--json)
|
--json)
|
||||||
comps=$( busctl --json=help 2>/dev/null )
|
comps=$( busctl --json=help 2>/dev/null )
|
||||||
;;
|
;;
|
||||||
|
--destination)
|
||||||
|
comps=$( __get_busnames $mode )
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||||
return 0
|
return 0
|
||||||
@ -121,6 +125,7 @@ _busctl() {
|
|||||||
[BUSNAME]='status monitor capture tree'
|
[BUSNAME]='status monitor capture tree'
|
||||||
[OBJECT]='introspect'
|
[OBJECT]='introspect'
|
||||||
[METHOD]='call'
|
[METHOD]='call'
|
||||||
|
[EMIT]='emit'
|
||||||
[PROPERTY_GET]='get-property'
|
[PROPERTY_GET]='get-property'
|
||||||
[PROPERTY_SET]='set-property'
|
[PROPERTY_SET]='set-property'
|
||||||
)
|
)
|
||||||
@ -165,6 +170,8 @@ _busctl() {
|
|||||||
else
|
else
|
||||||
comps=''
|
comps=''
|
||||||
fi
|
fi
|
||||||
|
elif __contains_word "$verb" ${VERBS[EMIT]}; then
|
||||||
|
comps=''
|
||||||
elif __contains_word "$verb" ${VERBS[PROPERTY_GET]}; then
|
elif __contains_word "$verb" ${VERBS[PROPERTY_GET]}; then
|
||||||
if [[ $n -eq 1 ]] ; then
|
if [[ $n -eq 1 ]] ; then
|
||||||
comps=$( __get_busnames $mode)
|
comps=$( __get_busnames $mode)
|
||||||
|
Loading…
Reference in New Issue
Block a user