From 9ae737288fe48601d7b1d19075a683da31eaaa94 Mon Sep 17 00:00:00 2001 From: Shinyzenith Date: Sat, 23 Mar 2024 22:57:52 +0530 Subject: [PATCH] docs(wayshot): Improve CLI documentation Signed-off-by: Shinyzenith --- wayshot/src/cli.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/wayshot/src/cli.rs b/wayshot/src/cli.rs index eb776912..7a5dc1f6 100644 --- a/wayshot/src/cli.rs +++ b/wayshot/src/cli.rs @@ -11,12 +11,16 @@ use clap::builder::TypedValueParser; #[derive(Parser)] #[command(version, about)] pub struct Cli { - ///Provide a custom file path ( encoding format is inferred from the file extension ). If path provided is directory then the output image is saved to provided path with default naming scheme. Default path is ./ , `-` indicates writing to terminal (stdout). - #[arg(value_name = "OUTPUT")] + /// Custom output path can be of the following types: + /// 1. Directory (Default naming scheme is used for the image output). + /// 2. Path (Encoding is automatically inferred from the extension). + /// 3. `-` (Indicates writing to terminal [stdout]). + #[arg(value_name = "OUTPUT", verbatim_doc_comment)] pub file: Option, - /// Copy image to clipboard along with [OUTPUT] or stdout. Wayshot persists in the background to offer the image till the clipboard is overwritten. - #[arg(long)] + /// Copy image to clipboard along with [OUTPUT] or stdout. + /// Wayshot persists in the background to offer the image till the clipboard is overwritten. + #[arg(long, verbatim_doc_comment)] pub clipboard: bool, /// Log level to be used for printing to stderr @@ -33,7 +37,7 @@ pub struct Cli { /// Set image encoder, by default uses the file extension from the OUTPUT /// positional argument. Otherwise defaults to png. - #[arg(long, visible_aliases = ["extension", "format", "output-format"], value_name = "FILE_EXTENSION")] + #[arg(long, verbatim_doc_comment, visible_aliases = ["extension", "format", "output-format"], value_name = "FILE_EXTENSION")] pub encoding: Option, /// List all valid outputs