-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing todo items or context doesn't reset todo counter #22
Comments
Could also not find a way to delete all todos (reset/drop the database) to achieve this (reset counter). Not even uninstalling then reinstalling the package. Any help would be appreciated. |
Hello! Yes, previously removed IDs can't be used by new tasks. One advantage of this behavior is that if you have any external reference to a removed task ID (i.e. you have written it down somewhere back when the task existed), there cannot be any ambiguity with a new task that would have "taken its place". I believe it is typical behavior in many applications not to allow the recycling of IDs. Also, todo indeed does not remove its application files upon uninstalling it, and a re-installation will re-use the application files from the previous installation. If you want to completely "reset" all todo data, you can first identify where it is located with the command:
which will print the location of todo's data directory. You can then remove this directory with |
Well I think in this case that keeping the index makes sense if a task was marked as done. Meanwhile, if I remove a task, it's likely that it doesn't exist anywhere physically (or I don't want it to if it does). Consider if someone gets access to my todo and decides to add 20 useless tasks (or I do with a script by mistake!); after removing them, I won't be so happy that it's impossible to reset it to the original state (in terms of the index). In all cases, I understand your point, the task removed could somehow still exist physically. In this case, it would be nice to have both options. Regardless, for my particular use case being able to Thanks for this nice project. It's the most feature-rich and comprehensive Todo CLI that I have found except for the fact that it's nontrivial to move individual items from one context to another xD. |
Thanks for the feedback! I'll consider adding an option to recycle IDs from removed tasks depending on how easy it is to implement.
The command is |
I wonder if this is reflected in the reference as I was looking for that. Also, the fact that it can't done be done for multiple ids is okay for me. Thank you. |
Consider repeatedly running:
The todo item counter keeps incrementing forever.
The text was updated successfully, but these errors were encountered: