todotxt / todo.txt-cli

☑️ A simple and extensible shell script for managing your todo.txt file.
http://todotxt.org
GNU General Public License v3.0
5.56k stars 713 forks source link

todo.sh uses parent of TODO_DIR instead of TODO_DIR itself. #250

Closed jhartshorn closed 6 years ago

jhartshorn commented 6 years ago

Do you want to request a feature or report a bug? Bug

What is the current behavior? todo.txt in parent of TODO_DIR is used by todo.sh.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Add to .todo/config: export TODO_DIR=$(dirname "/home/james/Dropbox/todo") Running todo.sh a "test" creates a new todo.txt file in `/home/james/Dropbox'.

What is the expected behavior? Running todo.sh a "test" creates a new todo.txt file in `/home/james/Dropbox/todo'.

Which versions todo.sh are you using?

Run todo.sh -V

TODO.TXT Command Line Interface v2.11.0

Which Operating System are you using? Arch Linux

Which version of bash are you using?

Run bash --version GNU bash, version 4.4.19(1)-release (x86_64-unknown-linux-gnu)

Please note that this can be worked around by adding a further subfolder to TODO_DIR. When I set TODO_DIR to /home/james/Dropbox/todo/bug (which did not exist) todo.sh used the file in /home/james/Dropbox/todo.

karbassi commented 6 years ago

@jhartshorn Can you update your .todo/config file to be:

export TODO_DIR= "/home/james/Dropbox/todo"

Rather than

export TODO_DIR=$(dirname "/home/james/Dropbox/todo")
jhartshorn commented 6 years ago

That worked - apologies, I didn't spot that. I edited the wrong line in the config and thought I'd put things straight. I didn't mean to use the bug tracker as a support forum, but thanks nevertheless!