list taken name only if category flag is given

This commit is contained in:
fiplox 2021-05-31 22:55:32 +02:00
parent 536624480a
commit 1e4fb62369
1 changed files with 5 additions and 1 deletions

View File

@ -54,7 +54,11 @@ pub fn make_app() -> App<'static, 'static> {
.alias("l")
.alias("ls")
.about("List all notes or notes from a category.")
.arg(Arg::with_name("name").help("Name of the category."))
.arg(
Arg::with_name("name")
.help("Name of the category.")
.requires("category"),
)
.arg(
Arg::with_name("category")
.help("List all notes from a category.")