3

I have lots of comments in the source code marked as future todos.

e.g. #todo:improve api for common syntax

etc.

I am using git for version control.

I would like to list all my todo, with something like

git list todo.

If no such plugin exists, can you guide me, how do I write one myself?

Mureinik
  • 297,002
  • 52
  • 306
  • 350
iamgopal
  • 8,806
  • 6
  • 38
  • 52

1 Answers1

5

Assuming all your todos are single-line comments, you could use git grep:

git grep '#todo'

You could then use redirects to store it for future use, e.g.:

git grep '#todo' > ~/Documents/my_project_todo.txt
Mureinik
  • 297,002
  • 52
  • 306
  • 350