bash_completion: fix autocompletion of CTID when global option is used
This is similar to previous commit, but for the case when we need
to autocomplete CTID after a command after a global option
(e.g. "vzctl --verbose set <tab>"). Old code made a wrong assumption that
CTID is a number, so if previous argument is not a number then we need
a number at the current position.
Change this check to remove the false assumption, let's check if the first
argument starts with "--", in that case it was a global option followed
by a command, and now we indeed need CTID.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed