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

Have to specify config file name. #227

Closed kdonavin closed 6 years ago

kdonavin commented 6 years ago

I had to specify TODOTXT_CFG_FILE=/Users/kDubs/.todo/config/todo.cfg config file, rather than just the directory (i.e., ~/.todo/config) in order to get the CLI to run. Otherwise, I was unable to use todo.txt-cli with the error:

/usr/local/bin/todo: line 696: .: /Users/kDubs/.todo/config: is a directory

Afterwards, the utility worked.

inkarkat commented 6 years ago

I think you misunderstood; ~/.todo/config is meant to be the config file, not a directory containing the config file!

If you want to place your configuration in ~/.todo/config/todo.cfg, you have to set the TODOTXT_CFG_FILE environment variable outside of todo.txt; e.g. in your ~/.bashrc.

kdonavin commented 6 years ago

Ah, that makes sense. I think in that case, the file todo.cfg in the todo.txt-cli repository should just be called config to avoid this confusion.

inkarkat commented 6 years ago

It's still todo.cfg because that's the original name and is still supported; also, many tests refer to it. I'm not sure about changing all of that. To me, it's rather unlikely that someone would look into the source code of todo.sh, find the fallback, and then misinterpret that. Okay, it happened here, but until there are more of these issues, I'd rather keep things as they are. If someone else has a different opinion, please add your thoughts...

karbassi commented 6 years ago

I agree with @inkarkat here. Closing for now.