Hey,

I used Homebrew to install bash-completion (1.3 I believe) via
    `brew install bash-completion`
and added

  if [ -f $(brew --prefix)/etc/bash_completion ]; then

    . $(brew --prefix)/etc/bash_completion

  fi

to my ~/.bash_profile. I noticed that some of my ssh Hosts were not
autocompleting. Inspecting it further, it appears that any host starting
with the letter 't' gets stripped for the autocompletion. I made a test
file:

    Host tier3
    User kratsg
    IdentityFile ~/.ssh/(a file)

then ran the regex against it:

sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t
'"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "testfile"

and this outputted 'ier3' rather than 'tier3' as expected. It appears the
regex is not totally valid but I've tried to debug it... and found that the
following works

sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$
"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "testfile"

outputting 'tier3' as expected. I removed the '\t ' from the block
containing the $. It seems like a bug.

Thanks and let me know,

Giordon
_______________________________________________
Bash-completion-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel

Reply via email to