[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-302-gd8e22da
Ville Skyttä
ville.skytta at iki.fi
Sun May 15 12:59:41 UTC 2011
The following commit has been merged in the master branch:
commit 84f9f7849450a40398d9b342831d378a8779d2fc
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun May 15 15:23:05 2011 +0300
qemu: Use _parse_help, add basic test case.
diff --git a/completions/qemu b/completions/qemu
index f093399..1e31484 100644
--- a/completions/qemu
+++ b/completions/qemu
@@ -102,20 +102,8 @@ _qemu()
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '-M -fda -fdb -hda -hdb -hdc -hdd \
- -cdrom -boot -snapshot -no-fd-bootchk -m -smp -nographic -vnc \
- -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" ) )
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help ) -fd{a,b}
+ -hd{a..d}' -- "$cur" ) )
else
_filedir
fi
diff --git a/test/completion/qemu.exp b/test/completion/qemu.exp
new file mode 100644
index 0000000..deedd3a
--- /dev/null
+++ b/test/completion/qemu.exp
@@ -0,0 +1 @@
+assert_source_completions qemu
diff --git a/test/lib/completions/a2ps.exp b/test/lib/completions/qemu.exp
similarity index 80%
copy from test/lib/completions/a2ps.exp
copy to test/lib/completions/qemu.exp
index 77cd07f..cd3d593 100644
--- a/test/lib/completions/a2ps.exp
+++ b/test/lib/completions/qemu.exp
@@ -11,7 +11,7 @@ proc teardown {} {
setup
-assert_complete_any "a2ps "
+assert_complete_any "qemu "
sync_after_int
--
bash-completion
More information about the Bash-completion-commits
mailing list