VladimirMarkelov / ttdl

TTDL - Terminal Todo List Manager
MIT License
209 stars 17 forks source link

Add filter for no context or no tags #41

Closed samuelallan72 closed 3 years ago

samuelallan72 commented 3 years ago

This is something that I'm looking for to support my gtd-like workflow, where no context == inbox.

Given the todo.txt contents:

2020-12-25 task 1 @next
2020-12-25 task 2 @backlog
2020-12-25 task 3

A command like ttdl list --no-context should output:

 # D P Due        Subject
--------------------------
 3                task 3

Ditto for tags.

VladimirMarkelov commented 3 years ago

Good idea.

Though, maybe we can go with --context none - to be consistent with other fields which support none. I doubt none as a value for a tag or a context makes sense :)

VladimirMarkelov commented 3 years ago

In a new branch(for both todo_lib and ttdl) I added filtering todos with --context, --project, and --tag. All accept comma-separated list of values including special ones(none and any - as other filters accept). In addition, all support basic pattern matching (*txt, txt*, *txt* - end with, start with, contain the text txt). After improving README, I'll publish the new versions.

VladimirMarkelov commented 3 years ago

Master branch updated, but I have not updated the crate - I want to fix issue 43 first

samuelallan72 commented 3 years ago

@VladimirMarkelov thanks, this is great! :D