Change UI. Positional args are not possible here
This commit is contained in:
parent
6a7e7f0f12
commit
05a630f943
1 changed files with 17 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue