From 4f9217bca0cf5d782f65560d9b49efe92f5e9345 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 30 Oct 2024 11:28:25 -0600 Subject: [PATCH] Support zed://ssh (#19970) Closes: #15070 Release Notes: - Added support for `zed://ssh//` --- crates/zed/src/zed/open_listener.rs | 3 +++ docs/src/remote-development.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/zed/src/zed/open_listener.rs b/crates/zed/src/zed/open_listener.rs index f1cfc43a6a..b37bc78dce 100644 --- a/crates/zed/src/zed/open_listener.rs +++ b/crates/zed/src/zed/open_listener.rs @@ -47,6 +47,9 @@ impl OpenRequest { this.parse_file_path(file) } else if let Some(file) = url.strip_prefix("zed://file") { this.parse_file_path(file) + } else if let Some(file) = url.strip_prefix("zed://ssh") { + let ssh_url = "ssh:/".to_string() + file; + this.parse_ssh_file_path(&ssh_url, cx)? } else if url.starts_with("ssh://") { this.parse_ssh_file_path(&url, cx)? } else if let Some(request_path) = parse_zed_link(&url, cx) { diff --git a/docs/src/remote-development.md b/docs/src/remote-development.md index e2bf1c5b66..771be830bc 100644 --- a/docs/src/remote-development.md +++ b/docs/src/remote-development.md @@ -23,7 +23,7 @@ On your local machine, Zed runs its UI, talks to language models, uses Tree-sitt 1. Once the Zed server is running, you will be prompted to choose a path to open on the remote server. > **Note:** Zed does not currently handle opening very large directories (for example, `/` or `~` that may have >100,000 files) very well. We are working on improving this, but suggest in the meantime opening only specific projects, or subfolders of very large mono-repos. -For simple cases where you don't need any SSH arguments, you can run `zed ssh://[@][:]/` to open a remote folder/file directly. +For simple cases where you don't need any SSH arguments, you can run `zed ssh://[@][:]/` to open a remote folder/file directly. If you'd like to hotlink into an SSH project, use a link of the format: `zed://ssh/[@][:]/`. ## Supported platforms