On Wed, 14 Dec 2016 Vincent Danjean <vdanj...@debian.org> wrote: > I'm using automatic gateway with ssh (and ProxyCommand) so that > ssh gw1+gw2+host will correctly setup a connection first to gw1, > then to gw2 (via gw1 and ProxyCommand) and eventually with host > (via gw2 and ProxyCommand) whatever gw1, gw2 and host are.
Do you need some sort of configuration in ~/.ssh/config? > To do that, I need the '+' character in ssh hostname. Is the `+' character in the `Host' entry in ~/.ssh/config? > It works > perfectly with ssh, scp, rsync, ... but not with bash-completion. The > reason is that the '+' is not escaped when a regexp for awk is built > in _known_hosts_real. I'd like to reproduce the problem you are describing, but I need more information on how to do it. > diff --git a/bash_completion b/bash_completion > index 6d3ba76..c640278 100644 > --- a/bash_completion > +++ b/bash_completion > @@ -1484,6 +1496,7 @@ _known_hosts_real() > # Escape slashes and dots in paths for awk > awkcur=${cur//\//\\\/} > awkcur=${awkcur//\./\\\.} > + awkcur=${awkcur//\+/\\\+} > curd=$awkcur > > if [[ "$awkcur" == [0-9]*[.:]* ]]; then As mentioned by Ville Skyttä in his reply [1], this should be fixed upstream, as a side-effect of a refactoring. However, the patch has been committed after the release of version 2.8. I can certainly backport it to Debian (and I have already done so in a local branch), but it would be nice to reproduce the bug and check that the backport actually fixes it. So, could you provide some `steps to reproduce'? Thanks, Gabriel [1] https://bugs.debian.org/848125#10