summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2017-09-15 21:56:12 +0200
committerGitHub <noreply@github.com>2017-09-15 21:56:12 +0200
commita5951e6951cf8b079c18f0e33b7a3d87ef08e2cc (patch)
tree5291e128d5636e35d9701723a4f414ef98dec965
parentbe8a3d1242632af0b3e369b3d78633a44eb6f041 (diff)
parent1ffc45a4c0d1914ba43b87e4f17e97bd9ced3caa (diff)
downloadimag-a5951e6951cf8b079c18f0e33b7a3d87ef08e2cc.zip
imag-a5951e6951cf8b079c18f0e33b7a3d87ef08e2cc.tar.gz
Merge pull request #1072 from matthiasbeyer/imag-notes/positional-args
imag-notes: Use positional args
-rw-r--r--bin/domain/imag-notes/src/ui.rs19
-rw-r--r--doc/src/09020-changelog.md1
2 files changed, 9 insertions, 11 deletions
diff --git a/bin/domain/imag-notes/src/ui.rs b/bin/domain/imag-notes/src/ui.rs
index f9ae739..1b78549 100644
--- a/bin/domain/imag-notes/src/ui.rs
+++ b/bin/domain/imag-notes/src/ui.rs
@@ -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")
diff --git a/doc/src/09020-changelog.md b/doc/src/09020-changelog.md
index 2a8085e..c7b83d1 100644
--- a/doc/src/09020-changelog.md
+++ b/doc/src/09020-changelog.md
@@ -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