VladimirMarkelov / ttdl

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

Default apply threshold filter "none..today" #50

Closed SevereOverfl0w closed 3 years ago

SevereOverfl0w commented 3 years ago

Threshold is used to hide tasks I can't deal with for a few days. It would be useful therefore if --threshold none..today was applied by default when running ttdl list unless I specifically override it by supplying --threshold, e.g. ttdl --threshold=tomorrow.

VladimirMarkelov commented 3 years ago

Good to know. Thanks for the explanation. I never used threshold and it was unclear to me how people use it.

VladimirMarkelov commented 3 years ago

threshold uses default range none..today since version 2.1.0

SevereOverfl0w commented 3 years ago

Nice! Although I may have misunderstood how the filters worked, and it should be none..yesterday. The way it works is that if for the date I'm posting this issue (2021-09-26) the todo had t:2021-09-26 it should show up, but t:2021-09-27 wouldn't. I should probably have just specified this instead of what I thought the filter should be.

VladimirMarkelov commented 3 years ago

From the current docs: "Ranges are always inclusive". So, I just make none..something work the same way as something..something to avoid confusion.

If I understood the threshold idea correctly, threshold was "The day since when the task must appear in the list". Example: for t:2021-09-26 and the current day 2021-09-26, the range none..today must include the record. Because today is one of the range ends. But I am not saying that my understanding is correct :) I do not remember reading an explanation of how threshold should work when I implemented it.

Before version 2.1 one must use threshold=none..tomorrow filter to get the same result. It seems a bit inconvenient to me because to include tomorrow one have use more cryptic threshold=none..2d.

SevereOverfl0w commented 3 years ago

It sounds correct, sounds like you've changed the behaviour to match what I expected!