git status as a todo reminder

You know those TODOs and FIXME left throughout your projects, never to be uncovered again and only to be wondered about by librarians far into the future?

No? Maybe just me.

Anyways, since a few months I made my git status shortcut remind me about them:

$ git st
## main...origin/main
 M explorer.go
explorer.go:    // FIXME: restrict paths to only boards/
static/board.js:  // FIXME: potential confusion because query overrides config, even if config is more recent
static/board.js:      // TODO: notify about override in yaml somehow
static/board.js:// TODO: support refreshing automatically
static/board.js:            // TODO: always display timestamps in utc
static/board.js:        // FIXME: support display of all datasets (only displays one so far)

(Note that TODO and FIXME would be highlighted in red.)

This works using a git alias and a bit of shell fun:

# ~/.gitconfig
[alias]
	st = "!st() { git status --short --branch . && (git grep -E --color 'TODO|FIXME' -- :^Makefile || true) }; st"

This greps for TODOs and FIXMEs in your repository, ignoring Makefile because that contains a target that greps for TODOs as well sometimes.

Helps me a lot, maybe it helps you too!