Skip to content
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

How do you have multiple todo.txt files under different folders? #440

Closed
flyisland opened this issue Nov 6, 2024 · 2 comments
Closed

How do you have multiple todo.txt files under different folders? #440

flyisland opened this issue Nov 6, 2024 · 2 comments

Comments

@flyisland
Copy link

I would like to have a todo.txt file for each of my projects. I hope this todo.txt file is located in the project's root folder. What do you think I should do?

@the1ts
Copy link
Contributor

the1ts commented Nov 7, 2024

Sounds like you would need to override the TODO_DIR variable with the projects root folder.
So from the project root:
export TODO_DIR=$(pwd) todo.sh may just work, this would rely on the done.txt etc being in the project root also.

@inkarkat
Copy link
Member

inkarkat commented Nov 7, 2024

This sounds like a duplicate of #187. In general, having multiple todo files is discouraged (maybe except for having both personal and work-related tasks separately, which can be easily solved via two different config files and separate aliases). The recommendation is to have a single todo file and use +project (or @context). That said, I'm also experimenting with per-project todo files for very short-term tactical tasks.

What exactly constitutes a project is quite subjective, and there are multiple use cases to consider (e.g. how is a project defined, what happens when tasks are done, should there be a fallback to the global one). I doubt that there'll be a built-in ready-to-use solution in the foreseeable future (and have reservations about the "search upwards from the current dir" approach taken by #187). However, it's really easy to implement a custom solution; remember that the todo.cfg is a Bash script, too, so you can conditionally set TODO_DIR there if a project is detected.

@inkarkat inkarkat closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants