Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Make help docs platform specific (#40194)

Julia Ryan6d8d2e298906
diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs
index 3044172d897..f3c15c25e8e 100644
--- a/crates/cli/src/main.rs
+++ b/crates/cli/src/main.rs
@@ -68,10 +68,13 @@ struct Args {
#[arg(short, long, overrides_with = "add")]
new: bool,
/// Sets a custom directory for all user data (e.g., database, extensions, logs).
- /// This overrides the default platform-specific data directory location.
- /// On macOS, the default is `~/Library/Application Support/Zed`.
- /// On Linux/FreeBSD, the default is `$XDG_DATA_HOME/zed`.
- /// On Windows, the default is `%LOCALAPPDATA%\Zed`.
+ /// This overrides the default platform-specific data directory location:
+ #[cfg_attr(target_os = "macos", doc = "`~/Library/Application Support/Zed`.")]
+ #[cfg_attr(target_os = "windows", doc = "`%LOCALAPPDATA%\\Zed`.")]
+ #[cfg_attr(
+ not(any(target_os = "windows", target_os = "macos")),
+ doc = "`$XDG_DATA_HOME/zed`."
+ )]
#[arg(long, value_name = "DIR")]
user_data_dir: Option<String>,
/// The paths to open in Zed (space-separated).