From 9c15b5b7a4008488f1a0e4e786db42a6cea397ca Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 3 Dec 2019 18:59:09 +0900 Subject: [PATCH] Move __fish_systemd_machines into machinectl completion script --- share/completions/machinectl.fish | 8 ++++++++ share/functions/__fish_systemd_machines.fish | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 share/functions/__fish_systemd_machines.fish diff --git a/share/completions/machinectl.fish b/share/completions/machinectl.fish index 847477b17..176c7c372 100644 --- a/share/completions/machinectl.fish +++ b/share/completions/machinectl.fish @@ -1,3 +1,11 @@ +function __fish_systemd_machine_images + # Like for running machines, I'm assuming machinectl doesn't allow spaces in image names + # This does not include the special image ".host" since it isn't valid for most operations + machinectl --no-legend --no-pager list-images | while read -l a b + echo $a + end +end + complete -f -e -c machinectl set -l commands list status show start login enable disable poweroff reboot \ diff --git a/share/functions/__fish_systemd_machines.fish b/share/functions/__fish_systemd_machines.fish deleted file mode 100644 index a4ab375f7..000000000 --- a/share/functions/__fish_systemd_machines.fish +++ /dev/null @@ -1,6 +0,0 @@ -# It seems machinectl will eliminate spaces from machine names so we don't need to handle that -function __fish_systemd_machines - machinectl --no-legend --no-pager list --all | while read -l a b - echo $a - end -end