From b0dc0140406ef00ce3eb41d0a9adb8fca8f1539b Mon Sep 17 00:00:00 2001 From: mo8it Date: Mon, 6 Apr 2026 17:24:43 +0200 Subject: [PATCH] Improve description of --edit-cmd --- src/cli.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 8bbe25aa..5830cbed 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -8,8 +8,14 @@ use crate::dev::DevCommand; pub struct Args { #[command(subcommand)] pub command: Option, - /// Open the current exercise by running the provided `EDIT_CMD EXERCISE_NAME`. - /// Ignored in VS Code + /// Open the current exercise by running `EDIT_CMD EXERCISE_PATH`. + /// The command is not allowed to block (e.g. `vim`). + /// It should communicate with an editor in a different process. + /// `EDIT_CMD` can contain arguments like `--edit-cmd "PROGRAM -x --arg1"`. + /// The current exercise's path is added by Rustlings as the last argument. + /// `--edit-cmd` is ignored in VS Code. + /// + /// Example: `--edit-cmd "code"` (default behavior if running in a VS Code terminal) #[arg(long)] pub edit_cmd: Option, /// Manually run the current exercise using `r` in the watch mode.