Enable help messages for command line arguments (#239)
This commit is contained in:
parent
87df7d80ec
commit
079d8037ab
4 changed files with 15 additions and 15 deletions
|
@ -43,7 +43,7 @@ pub enum Cmd {
|
||||||
#[structopt(long, short)]
|
#[structopt(long, short)]
|
||||||
human: bool,
|
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,
|
cmd_only: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ pub enum Cmd {
|
||||||
#[structopt(long, short)]
|
#[structopt(long, short)]
|
||||||
human: bool,
|
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,
|
cmd_only: bool,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ pub struct Cmd {
|
||||||
#[structopt(long, short)]
|
#[structopt(long, short)]
|
||||||
pub password: Option<String>,
|
pub password: Option<String>,
|
||||||
|
|
||||||
#[structopt(long, short, about = "the encryption key for your account")]
|
#[structopt(long, short, help = "the encryption key for your account")]
|
||||||
pub key: Option<String>,
|
pub key: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,39 +46,39 @@ pub enum AtuinCmd {
|
||||||
|
|
||||||
#[structopt(about = "interactive history search")]
|
#[structopt(about = "interactive history search")]
|
||||||
Search {
|
Search {
|
||||||
#[structopt(long, short, about = "filter search result by directory")]
|
#[structopt(long, short, help = "filter search result by directory")]
|
||||||
cwd: Option<String>,
|
cwd: Option<String>,
|
||||||
|
|
||||||
#[structopt(long = "exclude-cwd", about = "exclude directory from results")]
|
#[structopt(long = "exclude-cwd", help = "exclude directory from results")]
|
||||||
exclude_cwd: Option<String>,
|
exclude_cwd: Option<String>,
|
||||||
|
|
||||||
#[structopt(long, short, about = "filter search result by exit code")]
|
#[structopt(long, short, help = "filter search result by exit code")]
|
||||||
exit: Option<i64>,
|
exit: Option<i64>,
|
||||||
|
|
||||||
#[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<i64>,
|
exclude_exit: Option<i64>,
|
||||||
|
|
||||||
#[structopt(long, short, about = "only include results added before this date")]
|
#[structopt(long, short, help = "only include results added before this date")]
|
||||||
before: Option<String>,
|
before: Option<String>,
|
||||||
|
|
||||||
#[structopt(long, about = "only include results after this date")]
|
#[structopt(long, help = "only include results after this date")]
|
||||||
after: Option<String>,
|
after: Option<String>,
|
||||||
|
|
||||||
#[structopt(long, short, about = "open interactive search UI")]
|
#[structopt(long, short, help = "open interactive search UI")]
|
||||||
interactive: bool,
|
interactive: bool,
|
||||||
|
|
||||||
#[structopt(long, short, about = "use human-readable formatting for time")]
|
#[structopt(long, short, help = "use human-readable formatting for time")]
|
||||||
human: bool,
|
human: bool,
|
||||||
|
|
||||||
query: Vec<String>,
|
query: Vec<String>,
|
||||||
|
|
||||||
#[structopt(long, about = "Show only the text of the command")]
|
#[structopt(long, help = "Show only the text of the command")]
|
||||||
cmd_only: bool,
|
cmd_only: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
#[structopt(about = "sync with the configured server")]
|
#[structopt(about = "sync with the configured server")]
|
||||||
Sync {
|
Sync {
|
||||||
#[structopt(long, short, about = "force re-download everything")]
|
#[structopt(long, short, help = "force re-download everything")]
|
||||||
force: bool,
|
force: bool,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@ pub enum Cmd {
|
||||||
aliases=&["s", "st", "sta", "star"],
|
aliases=&["s", "st", "sta", "star"],
|
||||||
)]
|
)]
|
||||||
Start {
|
Start {
|
||||||
#[structopt(about = "specify the host address to bind", long, short)]
|
#[structopt(help = "specify the host address to bind", long, short)]
|
||||||
host: Option<String>,
|
host: Option<String>,
|
||||||
|
|
||||||
#[structopt(about = "specify the port to bind", long, short)]
|
#[structopt(help = "specify the port to bind", long, short)]
|
||||||
port: Option<u16>,
|
port: Option<u16>,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue