Skip to content

Commit b0dc014

Browse files
committed
Improve description of --edit-cmd
1 parent b486630 commit b0dc014

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/cli.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ use crate::dev::DevCommand;
88
pub struct Args {
99
#[command(subcommand)]
1010
pub command: Option<Command>,
11-
/// Open the current exercise by running the provided `EDIT_CMD EXERCISE_NAME`.
12-
/// Ignored in VS Code
11+
/// Open the current exercise by running `EDIT_CMD EXERCISE_PATH`.
12+
/// The command is not allowed to block (e.g. `vim`).
13+
/// It should communicate with an editor in a different process.
14+
/// `EDIT_CMD` can contain arguments like `--edit-cmd "PROGRAM -x --arg1"`.
15+
/// The current exercise's path is added by Rustlings as the last argument.
16+
/// `--edit-cmd` is ignored in VS Code.
17+
///
18+
/// Example: `--edit-cmd "code"` (default behavior if running in a VS Code terminal)
1319
#[arg(long)]
1420
pub edit_cmd: Option<String>,
1521
/// Manually run the current exercise using `r` in the watch mode.

0 commit comments

Comments
 (0)