bash-completion: busctl: support --json and -j option

This commit is contained in:
Yu Watanabe 2018-12-14 01:37:58 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 58493c6671
commit f675a1f005
1 changed files with 6 additions and 2 deletions

View File

@ -85,8 +85,8 @@ _busctl() {
--show-machine --unique --acquired --activatable --list
-q --quiet --verbose --expect-reply=no --auto-start=no
--allow-interactive-authorization=no --augment-creds=no
--watch-bind=yes'
[ARG]='--address -H --host -M --machine --match --timeout --size'
--watch-bind=yes -j'
[ARG]='--address -H --host -M --machine --match --timeout --size --json'
)
if __contains_word "--user" ${COMP_WORDS[*]}; then
@ -102,6 +102,10 @@ _busctl() {
;;
--machine|-M)
comps=$( __get_machines )
;;
--json)
comps=$( busctl --json=help 2>/dev/null )
;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0