As the headline says: I just found a way to get a list of all my TODO’s inside my git project in terminal.
Or, lets say i found a way to get all code-lines beginning with the string
# TODO or
git grep -E "# TODO|// TODO"
Do you want to get a list of only the todo’s that belong to you('re git username)? Try this:
git grep -El '# TODO|// TODO' | xargs -n1 git blame | grep $(git config user.name) | grep TODO
I wrote an alias for it into my
alias todo='git grep -El '# TODO|// TODO' | xargs -n1 git blame | grep $(git config user.name) | grep TODO'
So now i can type the command
todo into my command line and i know what to do :)
PS: If you want to do the same without git you could do something like
grep -rEI "# TODO|// TODO" . 2>/dev/null
But then you probably need to exclude a list of library-folders and sudmodules.