From 08c834ced082510a3bc0e1f4aaa79b326789fde1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcos?= Date: Mon, 3 Feb 2025 04:46:49 -0300 Subject: [PATCH] cli: Instruct in `--help` how to run to see all logs (#24112) Release Notes: - N/A --- crates/cli/src/main.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 5585709d56..c6562ea64a 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -33,7 +33,19 @@ trait InstalledApp { #[command( name = "zed", disable_version_flag = true, - after_help = "To read from stdin, append '-' (e.g. 'ps axf | zed -')" + before_help = "The Zed CLI binary. +This CLI is a separate binary that invokes Zed. + +Examples: + `zed` + Simply opens Zed + `zed --foreground` + Runs in foreground (shows all logs) + `zed path-to-your-project` + Open your project in Zed + `zed -n path-to-file ` + Open file/folder in a new window", + after_help = "To read from stdin, append '-', e.g. 'ps axf | zed -'" )] struct Args { /// Wait for all of the given paths to be opened/closed before exiting. @@ -45,10 +57,9 @@ struct Args { /// Create a new workspace #[arg(short, long, overrides_with = "add")] new: bool, - /// A sequence of space-separated paths that you want to open. + /// The paths to open in Zed (space-separated). /// - /// Use `path:line:row` syntax to open a file at a specific location. - /// Non-existing paths and directories will ignore `:line:row` suffix. + /// Use `path:line:column` syntax to open a file at the given line and column. paths_with_position: Vec, /// Print Zed's version and the app path. #[arg(short, long)]