From efb72f1f9182174f79849c9d28fcd0bc229abf51 Mon Sep 17 00:00:00 2001 From: Akatsuki <3736910+akiirui@users.noreply.github.com> Date: Tue, 10 Dec 2019 04:01:08 +0800 Subject: [PATCH] Revert "Move __fish_systemd_machines into machinectl completion script" This reverts commit 9c15b5b7a4008488f1a0e4e786db42a6cea397ca. --- share/completions/machinectl.fish | 8 -------- share/functions/__fish_systemd_machines.fish | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 share/functions/__fish_systemd_machines.fish diff --git a/share/completions/machinectl.fish b/share/completions/machinectl.fish index 176c7c372..847477b17 100644 --- a/share/completions/machinectl.fish +++ b/share/completions/machinectl.fish @@ -1,11 +1,3 @@ -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 new file mode 100644 index 000000000..a4ab375f7 --- /dev/null +++ b/share/functions/__fish_systemd_machines.fish @@ -0,0 +1,6 @@ +# 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