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

check current working dir for todo/ else use values from config file #357

Closed
alipirpiran opened this issue Aug 22, 2021 · 3 comments
Closed

Comments

@alipirpiran
Copy link

feature

check current working directory for todo/ directory.

  • if current working directory has todo/ directory ?
    • set $TODO_DIR to current_dir/todo/
  • else
    • set $TODO_DIR from config file values
@inkarkat
Copy link
Member

Duplicate of #187 (which doesn't require a todo/ subdir, which I find unnecessary; the filenames are already specific enough).

Also, this can be easily done via customization in todo.cfg, so you don't have to wait for the feature to be implemented - the feature would only make this even easier.

@jesseops
Copy link

For anyone else looking for how to implement the described customization in todo.cfg, here's what I added to mine so that I could have project-specific todo.txt files (eg, in a git repo):

❯ head ~/.todo.cfg
# === EDIT FILE LOCATIONS BELOW ===

# Your todo.txt directory (this should be an absolute path)
if test -f "${PWD}/todo.txt"; then
  export TODO_DIR=$PWD
else
  export TODO_DIR=$HOME/todo.txt
fi

# Your todo/done/report.txt locations

Note that this will create the done.txt,report.txt, etc files in the same directory.

@resistor4u
Copy link

@jesseops good suggestion. I'm in the same situation, but trying to keep todo.cfg in a Box Sync directory and in my case, the admins insist on keeping the default Box Sync name. Properly escaping the space across different machines is a problem I haven't solved yet, but this little function is helpful to the point that adding it in documentation or comments would be a welcome feature.

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

4 participants