VladimirMarkelov / ttdl

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

Consider forcing first arg to be a subcommand? #43

Closed samuelallan72 closed 3 years ago

samuelallan72 commented 3 years ago

I have accidentally added several entries from typos or experimenting with commands, for example:

18:15:38 ~ 0s
❯ ttdl del
Added todo:
 # D P Due        Subject
--------------------------
78                del

18:16:04 ~ 0s
❯ ttdl help
Added todo:
 # D P Due        Subject
--------------------------
79                help

This is more of a design or usability consideration, rather than a bug. Perhaps it would be worthwhile forcing use of the a or add subcommand to add an entry, rather than auto adding on an unrecognized command? I'm all for consistency and one well defined way to do an action.

VladimirMarkelov commented 3 years ago

As nobody suggested the feature, I think, people are fine with the current solution. Moreover, optional command was added after a request of one of the first users.

Alternative solution maybe adding an option (to config only?) that enables strict command format (with the only requirement: a command must exist).

samuelallan72 commented 3 years ago

@VladimirMarkelov

Alternative solution maybe adding an option (to config only?) that enables strict command format

Yep that could work. I'm not too worried about this issue; feel free to close it if you prefer the existing behaviour. I was just noting a beginner's usability issue. As I use it more, I'll give less incorrect commands and it won't be an issue for me any more. :)

VladimirMarkelov commented 3 years ago

Added strict mode(disabled by default) - master updated

samuelallan72 commented 3 years ago

Thanks, I will find this useful! :D