sh-todo: A minimal todo-list manager written in POSIX shell
sh-todo is my take on the minimal, command-line task manager. It allows you
to add, view and complete tasks. Completed tasks are marked with a completion
date and appended to a log of completed tasks kept in a separate file. They
remain visible in your todo list until you choose to clear them.
To install just put the
todone-archive scripts to
somewhere in your
$PATH and copy
~/.sh-todo, editing it to
sh-todo has no external dependencies beyond a POSIX-compliant
For the following examples, you'll have to use your imagination and view
--text-- as strike-through. Output uses the ANSI escape sequence for
strike-through by default, which will be rendered by your terminal if it supports it.
Add a task (note, no need to enclose it in quotes):
$ todo clear inbox $ todo pay rent
View task list:
$ todo • clear inbox • pay rent
Complete a task (just give a substring that will match):
$ todone rent • --pay rent--
View task list again:
$ todo • clear inbox • --pay rent (2011-02-22 16:42)--
Take a look at the file containing the todo list (editing with a text editor is encouraged):
$ cat path/to/my/todolist TODO clear inbox DONE pay rent (2011-02-22 16:42)
Remove completed todo items from main todo list:
$ todo-archive • --pay rent (2011-02-22 16:42)--
sh-todo - it should be self-explanatory. You just need to set up
$TODONE_F which are where your current todo list and list of
previously completed tasks are kept. Storing these files in a Dropbox or
Ubuntu One folder is useful for syncing between multiple machines.
- My main inspiration is from Jerod Santo's todo/todone in two single-line shell functions.
- Projects with a similar philosophy include t and t-.
How can I re-order tasks/delete without completing/edit existing tasks etc etc?
Just open your todo list in your favourite text editor. If you're a vim user, you'll likely find it helpful to set bindings such as these to assist in re-ordering.
How can I review recently completed tasks?
tac /path/to/my/todone | less or for a more neatly-formatted solution use
one of the
todone-view implementations which can be found in the
directory of this repository.
What is the
This directory holds scripts which may have any combination of the following properties: experimental, reliant on non-POSIX tools or languages, or implementing a feature that is unlikely to be widely useful. Contributions welcome.
I can't see any visual difference between completed and uncompleted tasks
Unfortunately the strike-through ANSI escape sequence is not supported in many
terminal emulators (in fact, gnome-terminal seems to be about the only one). I
have a suggested alternative escape sequence to use you can enable in
~/.sh-todo, which displays completed items in grey.
If you have any comments, suggestions, patches either submit them through github or email email@example.com.
Let's say MIT, but it's not really enough code to be worth it...
Copyright (c) 2011 Alex Bradbury Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.