Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonwellsjo committed May 19, 2023
1 parent 1116b1a commit ca4cd98
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dro"
version = "0.2.12"
version = "0.2.13"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Super minimal CLI todo (dro) application."
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ cargo install dro

### docs
```
Command: Options: Argument:
Command: Flag: Argument:
ls, list -f - view all dros
ls, list -f <opt> - view all dros
a, add description add new dro with <description>
md, markdone index mark dro at position <index> as done
mu, markundone index mark dro at position <index> as undone
md, markdone -i query/index mark dro at position <index> as done
mu, markundone -i query/index mark dro at position <index> as undone
pu, purge - deletes all dros that are marked as done
h, help - see documentation
v, version - see current version
Options:
Flag options:
-f/-format | d/date | i/index
-f/-format: d/date, i/index
```

### recommended aliases
Expand Down
26 changes: 14 additions & 12 deletions src/app/bash_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,24 @@ pub fn display_action_response(res: &ActionResponse) {
println!(" {}", res.message);
}
if res._type == ActionResponseType::Content {
for (index, dro) in res.dros.as_ref().unwrap().into_iter().enumerate() {
if res.formatting.is_some() {
let opts = &res.formatting.as_ref().unwrap().opts;
for opt in opts.into_iter() {
match opt {
Opt::Index => {
print!("{} ", index)
if res.dros.is_some() {
for (index, dro) in res.dros.as_ref().unwrap().into_iter().enumerate() {
if res.formatting.is_some() {
let opts = &res.formatting.as_ref().unwrap().opts;
for opt in opts.into_iter() {
match opt {
Opt::Index => {
print!("{} ", index)
}
Opt::Date => {
print!("{} ", dro.created.as_ref().unwrap(),)
}
_ => {}
}
Opt::Date => {
print!("{} ", dro.created.as_ref().unwrap(),)
}
_ => {},
}
}
println!("{} {}", dro.show_as_check(), dro.description,)
}
println!("{} {}", dro.show_as_check(), dro.description,)
}
}
}

0 comments on commit ca4cd98

Please sign in to comment.