_init_completion: Indicate that completion should not continue if cword == 0.

http://thread.gmane.org/gmane.comp.shells.bash.bugs/16499
http://lists.alioth.debian.org/pipermail/bash-completion-devel/2011-May/003635.html

Thanks-to: Igor Murzov <igor@gplsoft.org>
This commit is contained in:
Ville Skyttä 2011-05-02 13:51:55 +03:00
parent 68f6f1c685
commit 457dbf6061

View File

@ -740,7 +740,9 @@ _init_completion()
i=$(( ++i ))
fi
done
[[ $cword -ge 1 ]] && prev=${words[cword-1]} || prev=
[[ $cword -eq 0 ]] && return 1
prev=${words[cword-1]}
[[ $split ]] && _split_longopt && split=true