Skip to content

ssh host completion does not recognize hosts from files included with the Include directive #3011

@mimame

Description

@mimame

Current Behavior

The ssh host completion provided by carapace-bin does not seem to parse files that are included in the main ~/.ssh/config
file using the Include directive. As a result, any hosts defined in these included files are not available for completion.

Steps to Reproduce

  1. Create a standard ~/.ssh/config file.
  2. Inside ~/.ssh/config, add an Include directive to reference another file. For example:
 # ~/.ssh/config
Include ~/.ssh/config_hosts
  1. Create the included file (e.g., ~/.ssh/config_hosts) and define at least one host within it:
 # ~/.ssh/config_hosts
 Host my-remote-server
 HostName 192.168.1.100
 User myuser
  1. Save the files and attempt to use ssh completion in your shell:
    ssh my-r<TAB>

Expected Behavior

carapace-bin should complete my-remote-server as a valid hostname, as it is included in the ssh configuration.

Actual Behavior

The completion does not offer my-remote-server as an option, because it is not directly in ~/.ssh/config. It seems that
the Include directive is not being followed.

Environment

  • OS: NixOS 25.05
  • Carapace-bin Version: 1.5.0
  • Shell: fish 4.1.2

Expected Behavior

No response

Steps To Reproduce

No response

Version

1.5.0

OS

  • Darwin
  • Linux
  • Termux
  • Windows

Shell

  • Bash
  • Elvish
  • Fish
  • Nushell
  • Oil
  • Powershell
  • Xonsh
  • Zsh

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfishfundFundable with polar.shlinux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions