2011-11-01 22:14:45 +02:00
|
|
|
# autoconf(1) completion -*- shell-script -*-
|
2010-11-12 21:56:40 +02:00
|
|
|
|
|
|
|
_autoconf()
|
|
|
|
{
|
2011-05-01 22:18:40 +03:00
|
|
|
local cur prev words cword split
|
|
|
|
_init_completion -s || return
|
2010-11-12 21:56:40 +02:00
|
|
|
|
|
|
|
case "$prev" in
|
|
|
|
--help|-h|--version|-V|--trace|-t)
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--output|-o)
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--warnings|-W)
|
|
|
|
local cats=( cross obsolete syntax )
|
|
|
|
COMPREPLY=( $( compgen -W \
|
|
|
|
'${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur" ) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--prepend-include|-B|--include|-I)
|
|
|
|
_filedir -d
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
$split && return 0
|
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
2011-05-01 12:10:16 +03:00
|
|
|
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
2011-05-02 11:41:52 +03:00
|
|
|
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
2010-11-12 21:56:40 +02:00
|
|
|
return
|
|
|
|
fi
|
|
|
|
|
|
|
|
_filedir '@(ac|in)'
|
|
|
|
} &&
|
|
|
|
complete -F _autoconf autoconf
|
|
|
|
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|