VladimirMarkelov / ttdl

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

feature request: list the items which have no due date set #34

Closed obbardc closed 4 years ago

obbardc commented 4 years ago

How would you feel about ttdl accepting none as an argument like --due none to show items with no due date?

VladimirMarkelov commented 4 years ago

due already supports none(and its alias -):

$ ttdl list
# D P Created    Finished   Due        Subject
-----------------------------------------------
5                           2020-07-12 new line
6                                      no due date
-----------------------------------------------

# the same output for: ttdl list --due -
$ ttdl list --due none
# D P Created    Finished   Due        Subject
-----------------------------------------------
6                                      no due date
-----------------------------------------------
VladimirMarkelov commented 4 years ago

It should be mentioned in docs - I did not find it. I'll add it

VladimirMarkelov commented 4 years ago

As it works, I'm closing it in favor of #33 that is a broader issue and includes a bullet for document update.

obbardc commented 4 years ago

thanks! it works in v0.9.0

obbardc commented 4 years ago

With the new syntax, ability to chain none to a due-date range doesn't appear to work correctly:

$ ttdl list --due=none..today
invalid value invalid date 'none' for date range
VladimirMarkelov commented 4 years ago

Yeah, I forgot about none. Now, I think, we should agree on how none works in all the cases:

  1. Original one --due=none (a synonym is --due=-) - show all todos without a due date
  2. Left side of "normal" range --due=none..<date>: it is a handy way to combine two lists --due=..<date> and --due=none in one
  3. Right side of "normal" range --due=<date>..none: similar to 2 but combines --due=<date>.. and --due=none
  4. Open range which starts with none: --due=none... To me, it just shows all the todo as if a command omits a range. So this case can be ignored when detected.
  5. Open range which ends with none: --due=..none. To me, it looks like a synonym for --due=none
  6. Crazy range --due=none..none: I think it is the same as 5 (just for making a full set)

Am I missing anything? Does it look OK?