mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
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.
This commit is contained in:
parent
6eb8bec62d
commit
4f8f4c310c
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user