wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.93k stars 762 forks source link

More options from for DOMAINS in `ShowLauncherArgs` #5553

Closed simonmandlik closed 2 months ago

simonmandlik commented 3 months ago

I'm using this amazing keymap for attaching SSHMUX domains:

{ mods = "LEADER", key = "a", action = act.ShowLauncherArgs { flags = "FUZZY|DOMAINS" } }

This works amazingly as long as the specific hostname is specified in ~/.ssh_config. There is one problem with this. Sometimes I modify settings only for the second-level (or the third-level) domain, as there are might be too many possible subdomains.

This often happens in HPC clusters. I would have something like

cluster.com:
    User ...
    IdentityFile ...

in ~/.ssh_config, and I would connect like ssh node118.cluster.com or ssh node43.cluster.com. In such cases, wezterm.enumerate_ssh_hosts() only shows cluster.com.

I can think of two ways two solve this without having to use wezterm cli for each connection:

wez commented 2 months ago

I'm not sure exactly what you're angling for here, but I do want to note that: You have full control over the list of ssh domains via https://wezfurlong.org/wezterm/config/lua/config/ssh_domains.html

You might consider adjusting your config to parse ~/.ssh/known_hosts or otherwise obtain the relevant list of hosts using logic that makes sense to you and your specific use case.

simonmandlik commented 2 months ago

Thanks for the answer! I have solved it by manually modifying config.ssh_domains.

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.