summaryrefslogtreecommitdiff
path: root/shell-completion/bash/machinectl
diff options
context:
space:
mode:
authorSeth Jennings <sjenning@redhat.com>2015-08-11 11:40:17 -0500
committerSeth Jennings <sjenning@redhat.com>2015-08-16 11:20:21 -0500
commit4f8f4c310c5b48910470211d3525634e2a3743ff (patch)
treee3950aa5ae4a45573ec3d231b67b3d09bb851a37 /shell-completion/bash/machinectl
parent6eb8bec62d13025ec8c847c8bd0b6359c314d10e (diff)
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.
Diffstat (limited to 'shell-completion/bash/machinectl')
-rw-r--r--shell-completion/bash/machinectl3
1 files changed, 2 insertions, 1 deletions
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() {