mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-05-15 17:58:44 +00:00
Improve description of --edit-cmd
This commit is contained in:
parent
b48663030b
commit
b0dc014040
10
src/cli.rs
10
src/cli.rs
@ -8,8 +8,14 @@ use crate::dev::DevCommand;
|
|||||||
pub struct Args {
|
pub struct Args {
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
pub command: Option<Command>,
|
pub command: Option<Command>,
|
||||||
/// Open the current exercise by running the provided `EDIT_CMD EXERCISE_NAME`.
|
/// Open the current exercise by running `EDIT_CMD EXERCISE_PATH`.
|
||||||
/// Ignored in VS Code
|
/// 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)]
|
#[arg(long)]
|
||||||
pub edit_cmd: Option<String>,
|
pub edit_cmd: Option<String>,
|
||||||
/// Manually run the current exercise using `r` in the watch mode.
|
/// Manually run the current exercise using `r` in the watch mode.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user