4

Does anyone use the todo.txt command line interface (todotxt.com)? I would like it so that when I type todo ls to show my tasks, it will highlight the +contexts and @projects with colors. How do I do that?

Eddy
  • 3,427

2 Answers2

5

I am not sure when this feature was introduced, but with the current version of todo.sh, you can enable the coloring in your config file (normally todo.cfg) by setting the variables COLOR_PROJECT and COLOR_CONTEXT to some value:

export COLOR_PROJECT=$LIGHT_BLUE
export COLOR_CONTEXT=$GREEN

(for example)

If this is enough for your purpose, you don't have to install an external color filter.

Edgar
  • 235
3

The original color highlighting filter was posted on the todo.txt mailing list. And this Gist contains the version I once fixed for Gina, the initiator of todo.txt.

I have also written an extended version, published as part of my todo.txt-cli-ex extension.

Any of these must be installed in todo.cfg via

export TODOTXT_FINAL_FILTER=/path/to/colorSymbols
Ingo Karkat
  • 23,523