diff --git a/Cargo.toml b/Cargo.toml index 328f5b8db5e870df4f1954ccbdb713173a520f8b..bd9f57049af3a3add6a52a74aa518e0dc7ec0dbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -485,7 +485,7 @@ cfg-if = "1.0.3" chrono = { version = "0.4", features = ["serde"] } ciborium = "0.2" circular-buffer = "1.0" -clap = { version = "4.4", features = ["derive"] } +clap = { version = "4.4", features = ["derive", "wrap_help"] } cocoa = "=0.26.0" cocoa-foundation = "=0.2.0" convert_case = "0.8.0" diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index a2e0c449e982594d7197da355ff4720c4da87163..01318a7636bb42916f115ad55339ff4df0937e83 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -1248,7 +1248,7 @@ pub fn stdout_is_a_pty() -> bool { } #[derive(Parser, Debug)] -#[command(name = "zed", disable_version_flag = true)] +#[command(name = "zed", disable_version_flag = true, max_term_width = 100)] struct Args { /// A sequence of space-separated paths or urls that you want to open. /// @@ -1263,11 +1263,12 @@ struct Args { diff: Vec, /// 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`. - #[arg(long, value_name = "DIR")] + #[arg(long, value_name = "DIR", verbatim_doc_comment)] user_data_dir: Option, /// The username and WSL distribution to use when opening paths. If not specified, @@ -1287,8 +1288,11 @@ struct Args { #[arg(long)] dev_server_token: Option, - /// Prints system specs. Useful for submitting issues on GitHub when encountering a bug - /// that prevents Zed from starting, so you can't run `zed: copy system specs to clipboard` + /// Prints system specs. + /// + /// Useful for submitting issues on GitHub when encountering a bug that + /// prevents Zed from starting, so you can't run `zed: copy system specs to + /// clipboard` #[arg(long)] system_specs: bool,