aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-19 21:26:05 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-19 21:26:05 -0400
commitf949f04a3995e24b8a05a2323426eb69cdb1b922 (patch)
treea6e754eb578ffa9fca9f64d0e658fc2035a24b3a
parentbc543e4f26d3e29fe88a61457a924ab6ab238535 (diff)
downloadrbw-f949f04a3995e24b8a05a2323426eb69cdb1b922.tar.gz
rbw-f949f04a3995e24b8a05a2323426eb69cdb1b922.zip
add some command aliases
-rw-r--r--src/bin/rbw/main.rs24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/bin/rbw/main.rs b/src/bin/rbw/main.rs
index c95e319..c1bdfbd 100644
--- a/src/bin/rbw/main.rs
+++ b/src/bin/rbw/main.rs
@@ -27,13 +27,15 @@ fn main() {
.subcommand(clap::SubCommand::with_name("unlock"))
.subcommand(clap::SubCommand::with_name("sync"))
.subcommand(
- clap::SubCommand::with_name("list").arg(
- clap::Arg::with_name("fields")
- .long("fields")
- .takes_value(true)
- .use_delimiter(true)
- .multiple(true),
- ),
+ clap::SubCommand::with_name("list")
+ .arg(
+ clap::Arg::with_name("fields")
+ .long("fields")
+ .takes_value(true)
+ .use_delimiter(true)
+ .multiple(true),
+ )
+ .alias("ls"),
)
.subcommand(
clap::SubCommand::with_name("get")
@@ -81,7 +83,8 @@ fn main() {
"only-numbers",
"nonconfusables",
"diceware",
- ])),
+ ]))
+ .alias("gen"),
)
.subcommand(
clap::SubCommand::with_name("edit")
@@ -91,7 +94,8 @@ fn main() {
.subcommand(
clap::SubCommand::with_name("remove")
.arg(clap::Arg::with_name("name").required(true))
- .arg(clap::Arg::with_name("user")),
+ .arg(clap::Arg::with_name("user"))
+ .alias("rm"),
)
.subcommand(
clap::SubCommand::with_name("history")
@@ -100,7 +104,7 @@ fn main() {
)
.subcommand(clap::SubCommand::with_name("lock"))
.subcommand(clap::SubCommand::with_name("purge"))
- .subcommand(clap::SubCommand::with_name("stop-agent"))
+ .subcommand(clap::SubCommand::with_name("stop-agent").alias("logout"))
.get_matches();
let res = match matches.subcommand() {