]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bash-completion: busctl: support --json and -j option
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 13 Dec 2018 16:37:58 +0000 (01:37 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 14 Dec 2018 07:55:38 +0000 (08:55 +0100)
shell-completion/bash/busctl

index c5eab88caa81c873cec5a6e1781e5a8211e1d13b..476101c24cc7cc6ac0990d0c12de1f0ba7dae3ff 100644 (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