From f9ce40e4fa51c28d0e339c5b452f24a7411c9a9f Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Tue, 3 Jun 2025 14:01:50 +0200 Subject: [PATCH] More option description tweaks --- src/cli.rs | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 68b8e6e..853dbee 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -13,7 +13,7 @@ pub struct Cli { #[command(subcommand)] pub command: Commands, - /// Quiet mode, i.e. suppress diagnostic messages + /// Quiet mode - suppress diagnostic messages #[clap(short, long, global = true, display_order = 101)] pub quiet: bool, } @@ -23,7 +23,7 @@ pub enum Commands { /// Record a terminal session Rec(Record), - /// Replay a terminal session + /// Play back a terminal session Play(Play), /// Stream a terminal session @@ -35,7 +35,7 @@ pub enum Commands { /// Concatenate multiple recordings Cat(Cat), - /// Convert a recording into another format + /// Convert a recording to another format Convert(Convert), /// Upload a recording to an asciinema server @@ -62,7 +62,7 @@ pub struct Record { #[arg(long, short = 'I', alias = "stdin")] pub rec_input: bool, - /// Comma-separated list of env vars to capture [default: SHELL] + /// Comma-separated list of environment variables to capture [default: SHELL] #[arg(long, value_name = "VARS")] pub rec_env: Option, @@ -70,7 +70,7 @@ pub struct Record { #[arg(short, long)] pub append: bool, - /// Overwrite output file if it already exists + /// Overwrite the output file if it already exists #[arg(long, conflicts_with = "append")] pub overwrite: bool, @@ -82,15 +82,15 @@ pub struct Record { #[arg(short, long, value_name = "SECS")] pub idle_time_limit: Option, - /// Headless mode, i.e. don't use TTY for input/output + /// Headless mode - don't use the terminal for I/O #[arg(long)] pub headless: bool, - /// Override terminal size for the session + /// Override session's terminal window size #[arg(long, value_name = "COLSxROWS", value_parser = parse_window_size)] pub window_size: Option<(Option, Option)>, - /// Return session exit status + /// Return the session's exit status #[arg(long)] pub return_: bool, @@ -106,13 +106,9 @@ pub struct Record { #[derive(Debug, Args)] pub struct Play { - /// A path or an HTTP(S) URL of a recording file + /// A path or HTTP(S) URL of a recording file pub file: String, - /// Limit idle time to a given number of seconds - #[arg(short, long, value_name = "SECS")] - pub idle_time_limit: Option, - /// Set playback speed #[arg(short, long)] pub speed: Option, @@ -121,11 +117,15 @@ pub struct Play { #[arg(short, long, name = "loop")] pub loop_: bool, + /// Limit idle time to a given number of seconds + #[arg(short, long, value_name = "SECS")] + pub idle_time_limit: Option, + /// Automatically pause on markers #[arg(short = 'm', long)] pub pause_on_markers: bool, - /// Auto-resize terminal window to always match the original size (supported on some terminals) + /// Auto-resize the terminal window to match the original size (supported on some terminals) #[arg(short = 'r', long)] pub resize: bool, } @@ -149,7 +149,7 @@ pub struct Stream { #[arg(long, short = 'I')] pub rec_input: bool, - /// Comma-separated list of env vars to capture [default: SHELL] + /// Comma-separated list of environment variables to capture [default: SHELL] #[arg(long, value_name = "VARS")] pub rec_env: Option, @@ -157,15 +157,15 @@ pub struct Stream { #[arg(short, long)] pub title: Option, - /// Headless mode, i.e. don't use TTY for input/output + /// Headless mode - don't use the terminal for I/O #[arg(long)] pub headless: bool, - /// Override terminal size for the session + /// Override session's terminal window size #[arg(long, value_name = "COLSxROWS", value_parser = parse_window_size)] pub window_size: Option<(Option, Option)>, - /// Return session exit status + /// Return the session's exit status #[arg(long)] pub return_: bool, @@ -204,7 +204,7 @@ pub struct Session { #[arg(long, short = 'I')] pub rec_input: bool, - /// Comma-separated list of env vars to capture [default: SHELL] + /// Comma-separated list of environment variables to capture [default: SHELL] #[arg(long, value_name = "VARS")] pub rec_env: Option, @@ -212,7 +212,7 @@ pub struct Session { #[arg(short, long)] pub append: bool, - /// Overwrite output file if it already exists + /// Overwrite the output file if it already exists #[arg(long, conflicts_with = "append")] pub overwrite: bool, @@ -224,15 +224,15 @@ pub struct Session { #[arg(short, long, value_name = "SECS")] pub idle_time_limit: Option, - /// Headless mode, i.e. don't use TTY for input/output + /// Headless mode - don't use the terminal for I/O #[arg(long)] pub headless: bool, - /// Override terminal size for the session + /// Override session's terminal window size #[arg(long, value_name = "COLSxROWS", value_parser = parse_window_size)] pub window_size: Option<(Option, Option)>, - /// Return session exit status + /// Return the session's exit status #[arg(long)] pub return_: bool, @@ -253,17 +253,17 @@ pub struct Cat { #[derive(Debug, Args)] pub struct Convert { - /// Input asciicast file path, an HTTP(S) URL, or - (for stdin) + /// Input asciicast file path, HTTP(S) URL, or '-' (for stdin) pub input: String, - /// Output file path, or - (for stdout) + /// Output file path, or '-' (for stdout) pub output: String, /// Output file format [default: asciicast-v3] #[arg(short = 'f', long, value_enum, value_name = "FORMAT")] pub output_format: Option, - /// Overwrite target file if it already exists + /// Overwrite the output file if it already exists #[arg(long)] pub overwrite: bool, }