diff options
Diffstat (limited to 'completions/iwspy')
-rw-r--r-- | completions/iwspy | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/completions/iwspy b/completions/iwspy index e4805116..38b7868e 100644 --- a/completions/iwspy +++ b/completions/iwspy @@ -5,16 +5,16 @@ _iwspy() local cur prev words cword _init_completion || return - if [[ $cword -eq 1 ]]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '--help --version' -- "$cur") ) + if ((cword == 1)); then + if [[ $cur == -* ]]; then + COMPREPLY=($(compgen -W '--help --version' -- "$cur")) else _available_interfaces -w fi else - COMPREPLY=( $(compgen -W 'setthr getthr off' -- "$cur") ) + COMPREPLY=($(compgen -W 'setthr getthr off' -- "$cur")) fi } && -complete -F _iwspy iwspy + complete -F _iwspy iwspy # ex: filetype=sh |