Add completion for cygcheck.
--- a/.bashrc Mon Nov 07 20:32:07 2011 +0200
+++ b/.bashrc Tue Nov 08 16:00:08 2011 +0200
@@ -273,6 +273,37 @@
}
complete -F _make make gmake pmake
+_cygcheck() {
+ local opt
+ local cur=${COMP_WORDS[COMP_CWORD]}
+ case $COMP_CWORD in
+ 1)
+ case $cur in
+ -*)
+ COMPREPLY=( $(compgen -W "-v --verbose -h --help -V --version -c --check-setup -s --sysinfo
+ -k --keycheck -f --find-package -l --list-package -p --package-query" -- "$cur") )
+ return 0 ;;
+ *)
+ COMPREPLY=( $(compgen -c -- "$cur") )
+ return 0 ;;
+ esac
+ ;;
+ 2)
+ opt=${COMP_WORDS[1]}
+ case $opt in
+ -c|--check-setup|-l|--list-package)
+ pkgs=( /etc/setup/*.lst.gz )
+ pkgs=( ${pkgs[@]##*/} )
+ pkgs=( ${pkgs[@]%.lst.gz} )
+ COMPREPLY=( $(compgen -W '${pkgs[@]}' -- $cur ) )
+ return 0;;
+ esac
+ return 0;;
+ esac
+ return 0
+}
+complete -F _cygcheck cygcheck.exe cygcheck
+
# Use bash-completion, if available.
if [ -f /etc/bash_completion ]; then
# Under Cygwin bash completition start a long time.