sshs icon indicating copy to clipboard operation
sshs copied to clipboard

Feature request: parse and understand globs in Host lines

Open OmenWild opened this issue 8 months ago • 3 comments

I just discovered sshs, and it looks like it could replace my previously cobbled together system, really neat!

But, I have a bunch of entries in my ~/.ssh/config that look like this:

Host prefix-*
     HostName       %h.example.edu
     ProxyJump      me@proxy-host

It would be amazing if sshs could understand the prefix-* syntax and match it when I type prefix-host1, or prefix-host2.

Also, parsing and understanding Match Host otherprefix-* would be nice too.

OmenWild avatar Jun 12 '25 18:06 OmenWild

Hi! Glad you like it ❤

To be sure to understand, you want prefix-* to be displayed in the list as "prefix-host1" when you type "prefix-host1" in the search bar?

quantumsheep avatar Jun 12 '25 19:06 quantumsheep

It might make more sense if the list displayed prefix-* even if I have typed prefix-host1 in the search. That way I would know, exactly, which section of my ssh config will be used. But as long as I can type prefix-host1 and the connection uses my Host prefix-* ssh config section, I would be happy.

OmenWild avatar Jun 12 '25 23:06 OmenWild

Hi quantumsheep,

With more use, I realized that rather than match globs, it's easiest for my use case to simply return what I typed if there are no matches. This solves my request above. I have added it to my sort by Levenshtein distance PR.

OmenWild avatar Jul 11 '25 00:07 OmenWild