Simple TODO lister

Nice!

You can (and probably should) avoid all realpath calls btw, will send a PR with that change in a bit (EDIT: PR created).

A few potential improvements if you’re interested:

  • Output the line number along with the filename, e.g. main.zig:123
  • For a bit of fun, add a --random option that outputs one random TODO/FIXME/etc (to allow using it for FIXME roulette)
    • (alternatively, make each entry output on one line so | shuf | head -n1 works)

That would actually introduce a bug. The point of the if is to avoid closing the initial dir (context), so pop returning non-null isn’t the relevant bit of information.

4 Likes