From: Yu Watanabe Date: Thu, 13 Dec 2018 16:37:58 +0000 (+0900) Subject: bash-completion: busctl: support --json and -j option X-Git-Tag: v240~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f675a1f00595477968908fd1dd58a868422d83a3;p=thirdparty%2Fsystemd.git bash-completion: busctl: support --json and -j option --- diff --git a/shell-completion/bash/busctl b/shell-completion/bash/busctl index c5eab88caa8..476101c24cc 100644 --- a/shell-completion/bash/busctl +++ b/shell-completion/bash/busctl @@ -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