Resolve SSH config Include directives in host completion#212
Merged
lucieleblanc merged 3 commits intoApr 1, 2026
Conversation
The SSH host generator was hardcoded to 'cat ~/.ssh/config', which missed hosts defined in files referenced by Include directives. Users with configs split across included files (e.g. 'Include conf.d/*') got no host suggestions for those entries. Replace the command with one that uses awk to extract Include paths from ~/.ssh/config, resolves ~ to $HOME, treats relative paths as relative to ~/.ssh/, and lets the shell expand glob patterns. The included files are then read alongside the main config so all Host entries are available for completion. Fixes: APP-3506 See: GitHub #4072, #5900, #3708 Co-Authored-By: Oz <oz-agent@warp.dev>
APP-3506 Resolve SSH config Include directives in host completion
Spec + generator exist, but the SSH host generator is hardcoded to Fix: Change generator to use See GitHub #4072, #5900, #3708 |
Contributor
Author
peicodes
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
The SSH host generator was hardcoded to
cat ~/.ssh/config, which only reads the main config file. Users with configs split across included files viaIncludedirectives (e.g.Include conf.d/*) got no host suggestions for hosts defined in those files.Fixes: APP-3506
See: #4072, #5900, #3708
Changes
Replaced the
cat ~/.ssh/configcommand in both thehostsandaddressesgenerators with a command that:awkto extractIncludepaths from~/.ssh/config~to$HOME~/.ssh/(per SSH spec)The
known_hostsgenerator is unchanged since~/.ssh/known_hostsdoesn't use Include directives.Testing
all_command_specs_have_no_newlines(TMUX safety) andall_referenced_generators_exist.conf.d/*) and absolute (/path/to/conf.d/*) Include paths resolve correctly.Conversation: https://staging.warp.dev/conversation/c78432f4-e7f9-4799-a3be-fc2b53cac149
Run: https://oz.staging.warp.dev/runs/019d473b-6e27-7de1-8c6c-90d7629402cd
This PR was generated with Oz.