On 14/05/18 18:09, Richard Hector wrote: > Hi all, > > I recently started using the Include directive in my .ssh/config file - > so all the definitions are now in .ssh/config.d/. > > Now bash completion of hostnames no longer works. Is this expected > behaviour? Anyone know how to fix it, without reverting to a single file? > > I couldn't work out how to filter down a web search to find anything > useful :-( Aha. There's a debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834695 which refers to a solved upstream bug: https://github.com/scop/bash-completion/issues/70 ... so I guess I just have to wait for it to get to debian, probably in buster. In the meantime, I've modified /usr/share/bash-completion/bash_completion to suit my own needs (diff attached). Richard
--- /usr/share/bash-completion/bash_completion.orig 2018-05-14 21:43:30.775922065 +1200 +++ /usr/share/bash-completion/bash_completion 2018-05-14 21:45:06.338031392 +1200 @@ -1448,7 +1448,7 @@ if [[ -n $configfile ]]; then [[ -r $configfile ]] && config+=( "$configfile" ) else - for i in /etc/ssh/ssh_config ~/.ssh/config ~/.ssh2/config; do + for i in /etc/ssh/ssh_config ~/.ssh/config ~/.ssh2/config ~/.ssh/config.d/*; do [[ -r $i ]] && config+=( "$i" ) done fi
Attachment:
signature.asc
Description: OpenPGP digital signature