qemu: Use _parse_help, add basic test case.
This commit is contained in:
parent
1db66124e9
commit
84f9f78494
@ -102,20 +102,8 @@ _qemu()
|
|||||||
|
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-M -fda -fdb -hda -hdb -hdc -hdd \
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help ) -fd{a,b}
|
||||||
-cdrom -boot -snapshot -no-fd-bootchk -m -smp -nographic -vnc \
|
-hd{a..d}' -- "$cur" ) )
|
||||||
-k -audio-help -soundhw -localtime -full-screen -pidfile \
|
|
||||||
-daemonize -win2k-hack -option-rom -usb -usbdevice -net -tftp \
|
|
||||||
-smb -redir -kernel -append -initrd -serial -parallel -monitor \
|
|
||||||
-s -p -S -d -hdachs -L -std-vga -no-acpi -no-reboot -loadvm \
|
|
||||||
-semihosting -cpu -bt -vga -drive -startdate -name -curses \
|
|
||||||
-no-frame -no-quit -bootp -echr -no-shutdown -icount -g \
|
|
||||||
-prom-env -help -version -numa -mtdblock -sd -pflash \
|
|
||||||
-device -uuid -alt-grab -sdl -portrait -rtc-td-hack -no-hpet \
|
|
||||||
-balloon -acpitable -smbios -singlestep -gdb -hdachs -bios \
|
|
||||||
-kernel-kqemu -enable-kqemu -enable-kvm -clock -watchdog \
|
|
||||||
-watchdog-action -virtioconsole -show-cursor -tb-size -incoming \
|
|
||||||
-chroot -runas' -- "$cur" ) )
|
|
||||||
else
|
else
|
||||||
_filedir
|
_filedir
|
||||||
fi
|
fi
|
||||||
|
1
test/completion/qemu.exp
Normal file
1
test/completion/qemu.exp
Normal file
@ -0,0 +1 @@
|
|||||||
|
assert_source_completions qemu
|
20
test/lib/completions/qemu.exp
Normal file
20
test/lib/completions/qemu.exp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
proc setup {} {
|
||||||
|
save_env
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
proc teardown {} {
|
||||||
|
assert_env_unmodified
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
|
||||||
|
assert_complete_any "qemu "
|
||||||
|
|
||||||
|
|
||||||
|
sync_after_int
|
||||||
|
|
||||||
|
|
||||||
|
teardown
|
Loading…
x
Reference in New Issue
Block a user