fish-shell/share/completions/vmctl.fish
Johannes Altmanninger 9c327b19a6 Fix extra or missing newlines at end of file in our fish scripts
New fish_indent does that too, so this will make any future reformatting
diffs smaller.

Done using either of:

	perl -pi -e 'undef $/; s/\n*$/\n/' share/**.fish
	kak -n -f '<a-/>\n*<ret>d' share/**.fish
2020-08-09 23:53:46 +02:00

10 lines
553 B
Fish

function __fish_get_vmctl_vms
for line in (vmctl status | string match -e -v "MAXMEM")
set -l a (string split " " $line)
and printf "%s " $a[-1]
end
end
complete -c vmctl -xa 'console create load log reload reset start status stop pause unpause send receive' -n 'not __fish_seen_subcommand_from list console create load log reload reset start status stop pause unpause send receive'
complete -c vmctl -n '__fish_seen_subcommand_from console reload reset start status stop pause unpause send receive' -xa (__fish_get_vmctl_vms)