Move __fish_systemd_machines into machinectl completion script

This commit is contained in:
Jason 2019-12-03 18:59:09 +09:00 committed by Fabian Homborg
parent b658b421ad
commit 9c15b5b7a4
2 changed files with 8 additions and 6 deletions

View file

@ -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 \

View file

@ -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