From 079d8037ab59ea13dcff1811c1e32884e7a01ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sun, 12 Dec 2021 01:29:47 +0300 Subject: [PATCH] Enable help messages for command line arguments (#239) --- src/command/history.rs | 4 ++-- src/command/login.rs | 2 +- src/command/mod.rs | 20 ++++++++++---------- src/command/server.rs | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/command/history.rs b/src/command/history.rs index 4606b30..a74b210 100644 --- a/src/command/history.rs +++ b/src/command/history.rs @@ -43,7 +43,7 @@ pub enum Cmd { #[structopt(long, short)] human: bool, - #[structopt(long, about = "Show only the text of the command")] + #[structopt(long, help = "Show only the text of the command")] cmd_only: bool, }, @@ -55,7 +55,7 @@ pub enum Cmd { #[structopt(long, short)] human: bool, - #[structopt(long, about = "Show only the text of the command")] + #[structopt(long, help = "Show only the text of the command")] cmd_only: bool, }, } diff --git a/src/command/login.rs b/src/command/login.rs index 63a3e0e..c33fa5e 100644 --- a/src/command/login.rs +++ b/src/command/login.rs @@ -18,7 +18,7 @@ pub struct Cmd { #[structopt(long, short)] pub password: Option, - #[structopt(long, short, about = "the encryption key for your account")] + #[structopt(long, short, help = "the encryption key for your account")] pub key: Option, } diff --git a/src/command/mod.rs b/src/command/mod.rs index d82ad13..4864a8d 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -46,39 +46,39 @@ pub enum AtuinCmd { #[structopt(about = "interactive history search")] Search { - #[structopt(long, short, about = "filter search result by directory")] + #[structopt(long, short, help = "filter search result by directory")] cwd: Option, - #[structopt(long = "exclude-cwd", about = "exclude directory from results")] + #[structopt(long = "exclude-cwd", help = "exclude directory from results")] exclude_cwd: Option, - #[structopt(long, short, about = "filter search result by exit code")] + #[structopt(long, short, help = "filter search result by exit code")] exit: Option, - #[structopt(long = "exclude-exit", about = "exclude results with this exit code")] + #[structopt(long = "exclude-exit", help = "exclude results with this exit code")] exclude_exit: Option, - #[structopt(long, short, about = "only include results added before this date")] + #[structopt(long, short, help = "only include results added before this date")] before: Option, - #[structopt(long, about = "only include results after this date")] + #[structopt(long, help = "only include results after this date")] after: Option, - #[structopt(long, short, about = "open interactive search UI")] + #[structopt(long, short, help = "open interactive search UI")] interactive: bool, - #[structopt(long, short, about = "use human-readable formatting for time")] + #[structopt(long, short, help = "use human-readable formatting for time")] human: bool, query: Vec, - #[structopt(long, about = "Show only the text of the command")] + #[structopt(long, help = "Show only the text of the command")] cmd_only: bool, }, #[structopt(about = "sync with the configured server")] Sync { - #[structopt(long, short, about = "force re-download everything")] + #[structopt(long, short, help = "force re-download everything")] force: bool, }, diff --git a/src/command/server.rs b/src/command/server.rs index 2fcf23d..ad7addf 100644 --- a/src/command/server.rs +++ b/src/command/server.rs @@ -11,10 +11,10 @@ pub enum Cmd { aliases=&["s", "st", "sta", "star"], )] Start { - #[structopt(about = "specify the host address to bind", long, short)] + #[structopt(help = "specify the host address to bind", long, short)] host: Option, - #[structopt(about = "specify the port to bind", long, short)] + #[structopt(help = "specify the port to bind", long, short)] port: Option, }, }