Only list todos in certain context/project #366
-
|
I am looking for a way to print only the todos from a certain context/project. As far as I understand it, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Yes, Usually, the project and context names are simple and rather unique alphanumeric words, and you can simple pass them directly, e.g. This will match any context / project starting with the For interactive queries, I'm usually lazy and just specify the name as-is; any additional undesired tasks can be mentally skipped. The ugly correct filtering is important for scripting uses, though, that's why I've mentioned them. |
Beta Was this translation helpful? Give feedback.
Yes,
listconandlistprojonly get you the used contexts / projects. Filtering of items is done vials/list, by passing the optionalTERMargument.Usually, the project and context names are simple and rather unique alphanumeric words, and you can simple pass them directly, e.g.
todo.sh ls +you, but to be totally correct, you'd have to assert the whitespace before the sigil:todo.sh ls \ +youortodo.sh ls [[:space:]]+you.This will match any context / project starting with the
TERM; i.e.+youwill also match inside+youtube. In order to just match the full context / project, we need another assertion for either whitespace or the end of the line at the end:todo.sh ls '[[:space:]]+you\(…