Skip to content

[ssh-completion] Support blocks that define more than one Host#1223

Open
LostExcalibur wants to merge 1 commit intonushell:mainfrom
LostExcalibur:main
Open

[ssh-completion] Support blocks that define more than one Host#1223
LostExcalibur wants to merge 1 commit intonushell:mainfrom
LostExcalibur:main

Conversation

@LostExcalibur
Copy link

@LostExcalibur LostExcalibur commented Feb 18, 2026

It is a valid ssh config to have a block defining properties for more than one host, such as :

Host home home-git other-on-same-addr
	HostName example.com

This correctly parses such configs.

I also took the liberty to fix the annoying "HostName" text that was appearing in front of the actual hostname in the completion, because find was not called with -n and thus the splitting was done incorrectly.

It is a valid ssh config to have a block defining properties for more
than one host, such as :

Host home home-git other-on-same-addr
	HostName example.com

This correctly parses such configs.
@fdncred
Copy link
Contributor

fdncred commented Feb 18, 2026

@hongquan you changed this file last in a similar place. What do you think about these changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments