From 6eb8bec62d13025ec8c847c8bd0b6359c314d10e Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Tue, 11 Aug 2015 11:43:56 -0500 Subject: shell-completion: update machinectl bash completion Many new subcommands have been added since the bash completion was last updated. Bring it up to speed. --- shell-completion/bash/machinectl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl index 3789492d72..ad4de1789a 100644 --- a/shell-completion/bash/machinectl +++ b/shell-completion/bash/machinectl @@ -39,8 +39,8 @@ _machinectl() { ) local -A VERBS=( - [STANDALONE]='list' - [MACHINES]='status show terminate kill reboot login' + [STANDALONE]='list list-images' + [MACHINES]='status show start login enable disable poweroff reboot terminate kill copy-to copy-from image-status show-image clone rename read-only remove set-limit list-transfers cancel-transfer' ) _init_completion || return -- cgit v1.2.3-54-g00ecf From 4f8f4c310c5b48910470211d3525634e2a3743ff Mon Sep 17 00:00:00 2001 From: Seth Jennings Date: Tue, 11 Aug 2015 11:40:17 -0500 Subject: shell-completion: use list-images rather than list "machinectl list" only lists running machines while many of the MACHINES commands use names of images; both running and non-running. List machines from both "list" and "list-images" and use sort -u to avoid duplicates. --- shell-completion/bash/machinectl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl index ad4de1789a..0d09258a0b 100644 --- a/shell-completion/bash/machinectl +++ b/shell-completion/bash/machinectl @@ -26,7 +26,8 @@ __contains_word() { __get_machines() { local a b - machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; }; + (machinectl list-images --no-legend --no-pager; machinectl list --no-legend --no-pager) | \ + { while read a b; do echo " $a"; done; } | sort -u; } _machinectl() { -- cgit v1.2.3-54-g00ecf