Merge pull request #1072 from matthiasbeyer/imag-notes/positional-args
imag-notes: Use positional args
This commit is contained in:
commit
a5951e6951
2 changed files with 9 additions and 11 deletions
|
@ -24,27 +24,25 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
.subcommand(SubCommand::with_name("create")
|
.subcommand(SubCommand::with_name("create")
|
||||||
.about("Create a note")
|
.about("Create a note")
|
||||||
.version("0.1")
|
.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")
|
.arg(Arg::with_name("edit")
|
||||||
.long("edit")
|
.long("edit")
|
||||||
.short("e")
|
.short("e")
|
||||||
.takes_value(false)
|
.takes_value(false)
|
||||||
.required(false)
|
.required(false)
|
||||||
.help("Edit after creating"))
|
.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")
|
.subcommand(SubCommand::with_name("delete")
|
||||||
.about("Delete a Note")
|
.about("Delete a Note")
|
||||||
.version("0.1")
|
.version("0.1")
|
||||||
.arg(Arg::with_name("name")
|
.arg(Arg::with_name("name")
|
||||||
.long("name")
|
.index(1)
|
||||||
.short("n")
|
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.required(true)
|
.required(true)
|
||||||
.help("Delete Note with this name")
|
.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")
|
.about("Edit a Note")
|
||||||
.version("0.1")
|
.version("0.1")
|
||||||
.arg(Arg::with_name("name")
|
.arg(Arg::with_name("name")
|
||||||
.long("name")
|
.index(1)
|
||||||
.short("n")
|
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.required(true)
|
.required(true)
|
||||||
.help("Edit Note with this name")
|
.help("Edit Note with this name")
|
||||||
|
|
|
@ -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
|
* `imag-timetrack track` is now able to parse "now", date-only start/stop
|
||||||
dates and date-time start/stop times.
|
dates and date-time start/stop times.
|
||||||
* `libimagnotes` does not longer wrap store types but extend them.
|
* `libimagnotes` does not longer wrap store types but extend them.
|
||||||
|
* `imag-notes` uses positional arguments now.
|
||||||
|
|
||||||
* Stats
|
* Stats
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue