<div dir="ltr">Hey,<br><br>I used Homebrew to install bash-completion (1.3 I believe) via<br>    `brew install bash-completion`<br>and added<br><br>  if [ -f $(brew --prefix)/etc/bash_completion ]; then<br><br>    . $(brew --prefix)/etc/bash_completion<br>
<br>  fi<br><br>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:<br>
<br>    Host tier3<br>    User kratsg<br>    IdentityFile ~/.ssh/(a file)<br><br>then ran the regex against it:<br><div><br></div><div>







<p class="">sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "testfile"</p><p class="">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</p>
<p class="">







</p><p class="">sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$ "']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "testfile"</p><p class="">outputting 'tier3' as expected. I removed the '\t ' from the block containing the $. It seems like a bug.</p>
<p class="">Thanks and let me know,</p><p class="">Giordon</p></div></div>