diff options
Diffstat (limited to 'completions/avctrl')
-rw-r--r-- | completions/avctrl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/completions/avctrl b/completions/avctrl index 2ef499f3..89c24e47 100644 --- a/completions/avctrl +++ b/completions/avctrl @@ -5,16 +5,16 @@ _avctrl() local cur prev words cword _init_completion || return - if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '--help --quiet' -- "$cur") ) + if [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W '--help --quiet' -- "$cur")) else local args _count_args - if [[ $args -eq 1 ]]; then - COMPREPLY=( $(compgen -W 'discover switch' -- "$cur") ) + if ((args == 1)); then + COMPREPLY=($(compgen -W 'discover switch' -- "$cur")) fi fi } && -complete -F _avctrl avctrl + complete -F _avctrl avctrl # ex: filetype=sh |