[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh config "Include" and bash completion

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:
which refers to a solved upstream bug:

... so I guess I just have to wait for it to get to debian, probably in

In the meantime, I've modified

to suit my own needs (diff attached).

--- /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" )
-        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" )

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: