added conflicts to args

This commit is contained in:
Volodymyr Patuta 2020-12-12 15:57:08 +01:00
parent e628292d54
commit 1e4b9144d5
1 changed files with 5 additions and 1 deletions

View File

@ -31,6 +31,7 @@ pub fn make_app() -> App<'static, 'static> {
Arg::with_name("date") Arg::with_name("date")
.help("Delete all notes created at given date.") .help("Delete all notes created at given date.")
.short("d") .short("d")
.conflicts_with("header")
.long("date"), .long("date"),
), ),
) )
@ -60,6 +61,7 @@ pub fn make_app() -> App<'static, 'static> {
Arg::with_name("word") Arg::with_name("word")
.help("Search by word.") .help("Search by word.")
.short("w") .short("w")
.conflicts_with("header")
.long("word"), .long("word"),
) )
.arg(Arg::with_name("header").help("Name of the note.")), .arg(Arg::with_name("header").help("Name of the note.")),
@ -70,13 +72,15 @@ pub fn make_app() -> App<'static, 'static> {
Arg::with_name("all") Arg::with_name("all")
.help("Show all notes.") .help("Show all notes.")
.short("a") .short("a")
.conflicts_with("header")
.long("all"), .long("all"),
) )
.arg( .arg(
Arg::with_name("category") Arg::with_name("category")
.help("Show all notes from a category/date") .help("Show all notes from a category/date")
.short("c") .short("c")
.long("category"), .long("category")
.conflicts_with("header"),
) )
.arg(Arg::with_name("header").help("Name of the note.")), .arg(Arg::with_name("header").help("Name of the note.")),
) )