aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Evsyukov <[email protected]>2020-02-24 17:15:25 +0300
committerDenis Evsyukov <[email protected]>2020-02-24 17:15:25 +0300
commitd29b57ae72e22c88701c2f28790613e03d2a10a3 (patch)
tree88e77e3c3d7bf074b774e5620ddfc890cd38b4e4
parentremove actions (diff)
downloadt-d29b57ae72e22c88701c2f28790613e03d2a10a3.tar.xz
t-d29b57ae72e22c88701c2f28790613e03d2a10a3.zip
Edit README and format output tasks
-rw-r--r--README.md72
-rw-r--r--src/main.cpp4
2 files changed, 68 insertions, 8 deletions
diff --git a/README.md b/README.md
index f2c2457..b2e1a30 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,69 @@
# t
-## TODO
+`t` is a command-line todo list manager for people that want to *finish* tasks,
+not organize them.
-- [X] d,delete-if-empty
-- [X] verbose
-- [X] quiet
-- [X] error handling
-- [X] grep \ No newline at end of file
+This is fork [sjl/t](https://github.com/sjl/t) project on c++ language. You need
+only one binary file for work with your task.
+
+# Using t
+
+`t` is quick and easy to use.
+
+### Add a Task
+
+To add a task, use `t [task description]`:
+
+ $ t Clean the apartment.
+ $ t Write chapter 10 of the novel.
+ $ t Buy more beer.
+ $
+
+### List Your Tasks
+
+Listing your tasks is even easier -- just use `t`:
+
+ $ t
+ 9 - Buy more beer.
+ 30 - Clean the apartment.
+ 31 - Write chapter 10 of the novel.
+ $
+
+`t` will list all of your unfinished tasks and their IDs.
+
+### Finish a Task
+
+After you're done with something, use `t -f ID` to finish it:
+
+ $ t -f 31
+ $ t
+ 9 - Buy more beer.
+ 30 - Clean the apartment.
+ $
+
+### Edit a Task
+
+Sometimes you might want to change the wording of a task. You can use
+`t -e ID [new description]` to do that:
+
+ $ t -e 30 Clean the entire apartment.
+ $ t
+ 9 - Buy more beer.
+ 30 - Clean the entire apartment.
+ $
+
+Yes, nerds, you can use sed-style substitution strings:
+
+ $ t -e 9 /more/a lot more/
+ $ t
+ 9 - Buy a lot more beer.
+ 30 - Clean the entire apartment.
+ $
+
+### Delete the Task List if it's Empty
+
+If you keep your task list in a visible place (like your desktop) you might
+want it to be deleted if there are no tasks in it. To do this automatically
+you can use the `--delete-if-empty` option in your alias:
+
+ alias t='t --task-dir ~/Desktop --list todo.txt --delete-if-empty'
diff --git a/src/main.cpp b/src/main.cpp
index 2dc4d5a..adf08cf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -238,9 +238,9 @@ int main(int argc, char *argv[]) {
if (result.count("quiet")) {
std::cout << n.second << std::endl;
} else if (result.count("verbose")) {
- std::cout << n.first << ": " << n.second << std::endl;
+ std::cout << n.first << " - " << n.second << std::endl;
} else {
- std::cout << getPrefixByHash(n.first) << ": " << n.second << std::endl;
+ std::cout << getPrefixByHash(n.first) << " - " << n.second << std::endl;
}
}
}