A customisable bash/Perl script that shows your TODO list in your terminal window

Inspired by this post on reddit:

@whetu said: “I suspect it’s maybe do-able with some tput trickery combined with $PROMPT_COMMAND

That made me wonder how do-able it was. Very do-able.


Place somewhere accessible (~/bin/ for instance), set up your PROMPT_COMMAND variable and alias TODO to the script location:

alias TODO=~/bin/

Add some TODOs:

TODO "I need to do this thing"
TODO "and I have to do this thing too"

or if you’re feeling really crazy:

grep -Rn 'TODO\|FIXME' ~/project | perl -pe 's/:[^:]+TODO/:TODO/' | TODO -s

which will add all TODO/FIXME from ~/project. Yeah, you probably don’t wanna do that.

From then on you should see your list appearing in the top right-hand corner of your terminal. It’s numbered so you can run things like:

TODO -t 4       # toggles item 4 as done/not done
TODO -d 2       # deleted item 2 from your list

This script assumes you want to work on ~/TODO, but you can change the path to the file in itself, along with a few other settings.


You can change the colours, don't worry!