diff --git a/bash_completion b/bash_completion index b523de52..1337dcba 100644 --- a/bash_completion +++ b/bash_completion @@ -737,7 +737,7 @@ _init_completion() i=$(( ++i )) fi done - prev=${words[cword-1]} + [[ $cword -ge 1 ]] && prev=${words[cword-1]} || prev= return 0 }