3 _multipass_get_command_list () {
8 # -h, --help Display this help
9 # -v, --verbose Increase logging verbosity. Repeat the 'v' in the short option
10 # for more detail. Maximum verbosity is obtained with 4 (or more)
14 # alias Create an alias
15 # aliases List available aliases
18 $_comp_command1 --help | sed '1,/Available commands/d' | awk '/^[ \t]*[a-z]+/ { print $1 }'
21 _multipass_get_args_list () {
23 # $ multpass help stop
26 # -h, --help Display this help
27 # -v, --verbose Increase logging verbosity. Repeat the 'v' in the short
28 # option for more detail. Maximum verbosity is obtained with
29 # 4 (or more) v's, i.e. -vvvv.
30 # --all Stop all instances
31 # -t, --time <time> Time from now, in minutes, to delay shutdown of the
33 # -c, --cancel Cancel a pending delayed shutdown
36 # name Names of instances to stop. If omitted, and without the
37 # --all option, 'primary' will be assumed.
39 local arg_name=$($_comp_command1 help ${words[2]} | sed '1,/Arguments/d' | awk '/^[ \t]*[a-z]+/ { print $1; exit }')
45 # Name State IPv4 Image
46 # workable-poacher Running 10.2.0.28 Ubuntu openHAB Home Appliance
48 $_comp_command1 list | sed '1d' | awk '/^[ \t]*[^ ]+/ { print $1 }'
51 _multipass_get_command_list
65 compadd $(_multipass_get_command_list)
68 compadd $(_multipass_get_args_list)