Add a way to import ssh host names from the ssh config (#30926)

Closes https://github.com/zed-industries/zed/issues/20016

Use `"read_ssh_config": false` to disable the new behavior.

Release Notes:

- Added a way to import ssh host names from the ssh config

---------

Co-authored-by: Cole Miller <m@cole-miller.net>
This commit is contained in:
Kirill Bulatov 2025-05-18 22:34:47 +02:00 committed by GitHub
parent e468f9d2da
commit 83afe56a61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 419 additions and 78 deletions

View file

@ -417,6 +417,14 @@ pub fn local_vscode_launch_file_relative_path() -> &'static Path {
Path::new(".vscode/launch.json")
}
pub fn user_ssh_config_file() -> PathBuf {
home_dir().join(".ssh/config")
}
pub fn global_ssh_config_file() -> &'static Path {
Path::new("/etc/ssh/ssh_config")
}
/// Returns the path to the vscode user settings file
pub fn vscode_settings_file() -> &'static PathBuf {
static LOGS_DIR: OnceLock<PathBuf> = OnceLock::new();