Skip to content

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

Merged
fdncred merged 1 commit intonushell:mainfrom
LostExcalibur:main
Feb 19, 2026
Merged

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

Conversation

@LostExcalibur
Copy link
Contributor

@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?

Copy link
Contributor

@hongquan hongquan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@fdncred fdncred merged commit 6860e79 into nushell:main Feb 19, 2026
1 check passed
@fdncred
Copy link
Contributor

fdncred commented Feb 19, 2026

Thanks all!

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.

3 participants

Comments