2017-12-11 22:54:23 +08:00
|
|
|
|
2020-01-22 07:37:32 +08:00
|
|
|
function __fish_get_vmctl_vms
|
2020-02-17 21:12:27 +08:00
|
|
|
for line in (vmctl status | string match -e -v "MAXMEM")
|
2020-05-15 13:56:06 +08:00
|
|
|
set -l a (string split " " $line)
|
2020-02-17 21:12:27 +08:00
|
|
|
and printf "%s " $a[-1]
|
|
|
|
end
|
2020-01-22 07:37:32 +08:00
|
|
|
end
|
|
|
|
|
2017-12-11 22:54:23 +08:00
|
|
|
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'
|
2020-01-22 07:37:32 +08:00
|
|
|
complete -c vmctl -n '__fish_seen_subcommand_from console reload reset start status stop pause unpause send receive' -xa (__fish_get_vmctl_vms)
|
2017-12-11 22:54:23 +08:00
|
|
|
|