2011-11-01 22:14:45 +02:00
|
|
|
# avctrl completion -*- shell-script -*-
|
2011-10-12 23:01:10 +03:00
|
|
|
|
|
|
|
_avctrl()
|
|
|
|
{
|
|
|
|
local cur prev words cword
|
|
|
|
_init_completion || return
|
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '--help --quiet' -- "$cur" ) )
|
|
|
|
else
|
|
|
|
local args
|
|
|
|
_count_args
|
2011-11-09 23:28:11 +02:00
|
|
|
if [[ $args -eq 1 ]]; then
|
2011-10-12 23:01:10 +03:00
|
|
|
COMPREPLY=( $( compgen -W 'discover switch' -- "$cur" ) )
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
} &&
|
|
|
|
complete -F _avctrl avctrl
|
|
|
|
|
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|