diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-12-22 13:35:14 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2017-12-22 14:40:01 +0100 |
commit | 05a630f943aa92d4a830c2fbbb17517e2990811e (patch) | |
tree | 18e31610669c0bd35ce236fa5e936c5643ef20e2 /bin/domain/imag-habit | |
parent | 6a7e7f0f12077862dbc37e4a69ac3ff219f941a6 (diff) |
Change UI. Positional args are not possible here
Diffstat (limited to 'bin/domain/imag-habit')
-rw-r--r-- | bin/domain/imag-habit/src/ui.rs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/domain/imag-habit/src/ui.rs b/bin/domain/imag-habit/src/ui.rs index 67b0797b..d5148682 100644 --- a/bin/domain/imag-habit/src/ui.rs +++ b/bin/domain/imag-habit/src/ui.rs @@ -30,28 +30,41 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { .about("Create a new Habit") .version("0.1") .arg(Arg::with_name("create-name") - .index(1) + .long("name") + .short("n") .multiple(false) .required(true) .takes_value(true) .value_name("NAME") .help("Name of the new habit")) .arg(Arg::with_name("create-date") - .index(2) + .long("date") + .short("d") .multiple(false) .required(true) .takes_value(true) .value_name("DATE") .help("Date when the first instance should be done")) .arg(Arg::with_name("create-date-recurr-spec") - .index(3) + .long("recurr") + .short("r") .multiple(false) .required(true) .takes_value(true) .value_name("RECURRENCE-SPEC") .help("Spec how the habit should recur (eg: 'weekly', 'monthly', '5days', '12hours')")) + .arg(Arg::with_name("create-until") + .long("until") + .short("u") + .multiple(false) + .required(false) + .takes_value(true) + .value_name("UNTIL") + .help("Until-Date for the habit")) + .arg(Arg::with_name("create-comment") - .index(4) + .long("comment") + .short("c") .multiple(true) .required(true) .takes_value(true) |