VladimirMarkelov / ttdl

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

[Feature Request] Support for project and/or context column in default list view. #77

Closed debajyoti1990 closed 1 year ago

VladimirMarkelov commented 1 year ago

Good idea. Maybe I also thought about once but I have not add this feature ( I do not remember why). Extra questions to solve beforehand:

  1. How many tasks include project and/or context? In your case, it is possible that the majority of tasks have them. In my current list, none of a few tens of tasks has project/context. So, I have 2 reasons against making columns project/context visible by default: a) in my case I will always see two empty columns, until I change my config; b) because nobody asked this before I do not think it is a good default. I'm fine with adding new columns but they should be hidden by default.
  2. Can a task have a few projects/contexts? It looks like a project is usually only one, but I am not sure about the context number. If a task can have a few projects/contexts, how to display them? Comma-separated long line? Multiline: a project/context per line? Maybe the best solution for now is just to print one project/context per task - because it is unlikely to meet more than one in the same task. It allows implementing the simplest code without over-complications for very little number of tasks.
  3. See #75 about hiding project/context in subject column
VladimirMarkelov commented 1 year ago

Added two columns project and context hidden by default. They can be set to show always by changing the configuration file. Or one can pass --fields=<other-required-fields>,prj,ctx in command-line.

At this moment, both columns show all projects and contexts as a single line (comma-separated list). Anyway, I'm closing the issue for now. One-line display seems a good solution in majority of cases, and if we need multiline display later, we always can either reopen this issue or create a new one.