strange issue with bash-completion and .ssh/config host entries

eliott eliott at cactuswax.net
Tue Aug 11 17:14:34 PDT 2009


I have two machines that have bash-completion installed via macports.
They both had the older version of bash-completion (20060301), but
have been subsequently updated to the current version (1.0).

On both machines, before the upgrade, I had the following 'good' behavior.

if the .ssh/config file had this in it:

host foobar
  hostname 1.1.1.1

Then at a bash prompt i could type: ssh foo<tab> and it would complete
to foobar appropriately.
*Note that I have _no_ data in known_hosts or /etc/hosts for the name
'foobar' (removed for testing)*

After the upgrade to bash-completion 1.0, this no longer works on my systems.
On other another *nix box (centos-5.x) with bash_completion (1.0
version), this still works, with the same .bashrc and the same
.ssh/config file as in use on my 10.5 installs.

I have gone so far as to compare the bash_completion and
bash_completion.d/ssh scripts from macports to the other system. The
is no functional difference that I can tell. A few comments are
different, and one function testing for bash-4.0.

The other system has a slightly newer version of bash compared to the
10.5 default.

10.5 -- GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0)
centos5.3 -- GNU bash, version 3.2.25(1)-release (i686-redhat-linux-gnu)

Has anyone else run across this issue, and know a workaround or a fix?
Is it an issue with bash-completion, or something goofy with the
version of bash in 10.5?

I appreciate any insight anyone can provide.

--eliott


More information about the macports-users mailing list