Use positional args

This commit is contained in:
Matthias Beyer 2017-09-15 21:06:35 +02:00
parent be8a3d1242
commit 1ffc45a4c0
2 changed files with 9 additions and 11 deletions

View File

@ -24,27 +24,25 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.subcommand(SubCommand::with_name("create")
.about("Create a note")
.version("0.1")
.arg(Arg::with_name("name")
.long("name")
.short("n")
.takes_value(true)
.required(true)
.help("Create Note with this name")
.value_name("NAME"))
.arg(Arg::with_name("edit")
.long("edit")
.short("e")
.takes_value(false)
.required(false)
.help("Edit after creating"))
.arg(Arg::with_name("name")
.index(1)
.takes_value(true)
.required(true)
.help("Create Note with this name")
.value_name("NAME"))
)
.subcommand(SubCommand::with_name("delete")
.about("Delete a Note")
.version("0.1")
.arg(Arg::with_name("name")
.long("name")
.short("n")
.index(1)
.takes_value(true)
.required(true)
.help("Delete Note with this name")
@ -54,8 +52,7 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.about("Edit a Note")
.version("0.1")
.arg(Arg::with_name("name")
.long("name")
.short("n")
.index(1)
.takes_value(true)
.required(true)
.help("Edit Note with this name")

View File

@ -59,6 +59,7 @@ This section contains the changelog from the last release to the next release.
* `imag-timetrack track` is now able to parse "now", date-only start/stop
dates and date-time start/stop times.
* `libimagnotes` does not longer wrap store types but extend them.
* `imag-notes` uses positional arguments now.
* Stats