Bug 1417973

Summary: SSH host completion does not read all config files
Product: [Fedora] Fedora Reporter: Jad Kik <jadkik94>
Component: bash-completionAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 25CC: ooprala, sheltren, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: bash-completion-2.5-1.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-05 20:22:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jad Kik 2017-01-31 14:17:42 UTC
Description of problem:

If the `~/.ssh/config` file contains `Host example.com` directives, then `example.com` is autocompleted in `ssh <host>` but not if the `Host` directive is included from another file

Version-Release number of selected component (if applicable):

bash-completion-2.4-1.fc25.noarch

How reproducible:

Consistently

Steps to Reproduce:
1. Write this to `~/.ssh/config`:

```
Include config-not-read

Host works.example.com
        Host works.example.org
```

2. Write that to `~/.ssh/config-not-read`:

```
Host doesnot.example.com
        HostName doesnot.example.org
```

3. Type this `ssh works<tab><tab>`

4. Type that `ssh doesnot<tab><tab>`

Actual results:

[jkerry@localhost ~]$ ssh works.example.
works.example.com  works.example.org  
[jkerry@localhost ~]$ ssh doesnot
<empty line>

Expected results:

[jkerry@localhost ~]$ ssh works.example.
works.example.com  works.example.org  
[jkerry@localhost ~]$ ssh doesnot
doesnot.example.com  doesnot.example.org

Additional info:

I verified that it is not an SSH configuration issue by running `ssh -vvv doesnot.example.com` and checked that it does try to connect to `doesnot.example.org` instead.

Comment 1 Ville Skyttä 2017-02-01 12:38:53 UTC
Support for "include" in ssh configs is implemented upstream, but there's no release out with it yet.

https://github.com/scop/bash-completion/commit/1016e4336c2eaa95888275df6ea248b4e913fb76

Comment 2 Fedora Update System 2017-02-04 16:50:30 UTC
bash-completion-2.5-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6430f4ba0e

Comment 3 Fedora Update System 2017-02-05 02:21:29 UTC
bash-completion-2.5-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6430f4ba0e

Comment 4 Fedora Update System 2017-02-05 20:22:07 UTC
bash-completion-2.5-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.