Apparently this is a known problem that can't be fixed. /usr/share/doc/bash-completion/README.gz FAQ says:
Q. Completion goes awry when I try to complete on something that contains
a colon.
A. This is actually a 'feature' of bash. bash recognises a colon as
starting a new completion token, which is often what you want when
completing something like a PATH variable:
$ export PATH=/bin:/sbin:/usr<Tab>
Without the special treatment of the colon, the above wouldn't work
without programmable completion, so it has long been a feature of
the shell.
Unfortunately, you don't want the colon to be treated as a special
case when doing something like:
$ man File::B<Tab>
Here, the colons make bash think that it's completing the a new
token that begins with 'B'.
Unfortunately, there's no way to turn this off. The only thing you
can do is escape the colons with a backslash.
So, just quote your : as \:, and roll your eyes or whatever you have to do.
I would change this to Won'tfix, but apparently ordinary mortals can't do that.
Apparently this is a known problem that can't be fixed. /usr/share/ doc/bash- completion/ README. gz FAQ says:
Q. Completion goes awry when I try to complete on something that contains
a colon.
A. This is actually a 'feature' of bash. bash recognises a colon as
starting a new completion token, which is often what you want when
completing something like a PATH variable:
$ export PATH=/bin: /sbin:/ usr<Tab>
Without the special treatment of the colon, the above wouldn't work
without programmable completion, so it has long been a feature of
the shell.
Unfortunately, you don't want the colon to be treated as a special
case when doing something like:
$ man File::B<Tab>
Here, the colons make bash think that it's completing the a new
token that begins with 'B'.
Unfortunately, there's no way to turn this off. The only thing you
can do is escape the colons with a backslash.
So, just quote your : as \:, and roll your eyes or whatever you have to do.
I would change this to Won'tfix, but apparently ordinary mortals can't do that.