climech / grit

Multitree-based personal task manager
MIT License
1.67k stars 47 forks source link

tree --progress: Feature to save space from children of checked nodes #31

Open tsagkase opened 3 years ago

tsagkase commented 3 years ago

Assuming the tree:

$ grit tree 2020-11-11
[~] 2020-11-10 (149)
 └──[~] Work on the algebra textbook (150)
     ├──[~] Solve exercises from ch. 1 (151)
     │   ├··[x] Solve ex. 4 (50)
     │   ├··[x] Solve ex. 5 (51)
     │   ├··[x] Solve ex. 6 (52)
     │   ├··[ ] Solve ex. 7 (53)
     │   └··[x] Solve ex. 8 (54)
     │       ├··[x] Solve ex. 8a (55)
     │       └··[x] Solve ex. 8b (56)
     └──[x] Work on ch. 2 (152)
         ├··[x] Read the chapter (76)
         ├··[x] Solve ex. 1 (78)
         ├··[x] Solve ex. 2 (79)
         └··[x] Solve ex. 3 (80)

it would be nice to have the more concise tree --progress:

$ grit tree --progress 2020-11-11
[~] 2020-11-10 (149)
 └──[~] Work on the algebra textbook (150)
     ├──[~] Solve exercises from ch. 1 (151)
     │   ├··[x] Solve ex. 4 (50)
     │   ├··[x] Solve ex. 5 (51)
     │   ├··[x] Solve ex. 6 (52)
     │   ├··[ ] Solve ex. 7 (53)
     │   └··[x] Solve ex. 8 (54)
     └──[x] Work on ch. 2 (152)

The goal here is to save space from children of checked nodes. Or tree --concise may be better.

BTW, nice work! Thanks.