Skip to content

Only list todos in certain context/project #366

Answered by inkarkat
fritzrehde asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, listcon and listproj only get you the used contexts / projects. Filtering of items is done via ls / list, by passing the optional TERM argument.

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 \ +you or todo.sh ls [[:space:]]+you.

This will match any context / project starting with the TERM; i.e. +you will 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\(…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fritzrehde
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants