summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-todo/src/ui.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-03-01 17:22:09 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-03-01 17:22:09 +0100
commitd3f8706fa77c5430769f7452d172ce834811ee7b (patch)
tree52653900e33247c80583e4e8239a7f36c80457a6 /bin/domain/imag-todo/src/ui.rs
parent7ba3b2f2b0a8503a528c4f37ce932314e6fb44d6 (diff)
Fix: Simplify selecting what to print
The logic before that change was a bit bogus, as it printed stuff which was not expected. Now, things are cleared up: * Without -P, pending todos are always printed * With --deleted, deleted todos are printed * With -D / --done, done todos are printed * With -H / --hidden, hidden todos are printed No option influences the other. Therefore, the --deleted flag had to be added to the CLI. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/domain/imag-todo/src/ui.rs')
-rw-r--r--bin/domain/imag-todo/src/ui.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/domain/imag-todo/src/ui.rs b/bin/domain/imag-todo/src/ui.rs
index 7d0affd5..1172bb60 100644
--- a/bin/domain/imag-todo/src/ui.rs
+++ b/bin/domain/imag-todo/src/ui.rs
@@ -116,7 +116,7 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("H")
.takes_value(false)
.required(false)
- .help("Print also hidden todos")
+ .help("Print hidden todos")
)
.arg(Arg::with_name("list-done")
@@ -124,7 +124,14 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.short("D")
.takes_value(false)
.required(false)
- .help("Print also done todos")
+ .help("Print done todos")
+ )
+
+ .arg(Arg::with_name("list-deleted")
+ .long("deleted")
+ .takes_value(false)
+ .required(false)
+ .help("Print deleted todos")
)
.arg(Arg::with_name("list-nopending")