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
todo.sh doesn't know about CONFIG_DIR #377
Comments
Even with a default installation, For a long time, users had to customize the configuration, at least to provide the Therefore, the config file as installed served as a template only; user(s) were meant to at least copy it into their home directory, and modify it from there. (This is especially important for multi-user setups; though most systems today just have a single active user.) In 2013, this commit allowed the use of global config file, looking in In 2017, the remediesproposal AI think the default for the global config location should be changed from Note that you (the submitter) would then have to use proposal BThe Readme can certainly be interpreted the way you did (that proposal CJust add some clarifications in the Readme. When I encountered |
I think just updating the README with a little more information would help. As you point out this is not a simple solution to automate and unless this becomes a bigger sticking point it may not be worth the effort and complexity to change the code. |
And only coincidentally picked up as the global configuration (if CONFIG_DIR=/etc). Fixes todotxt#377
after follow the install guide on readme page, I meet a error: Fatal Error: Cannot read configuration file /home/ckw/.todo/config. Am I missing something? |
@ecjtusbs The installation only installs a configuration template (by default at |
Do you want to request a feature or report a bug?
A bug or a mismatch in documentation
What is the current behavior?
In the README the instructions on installing via
make install
talk about setting theCONFIG_DIR
variable to where you want todo.cfg file to be installed. The install works as expected and the config file will be created whereCONFIG_DIR
points.The problem is that
todo.sh
only searches for config files in the following locations https://github.com/todotxt/todo.txt-cli/blob/master/todo.sh#L693. So if you specify aCONFIG_DIR
that is not one of those directories thentodo.sh
fails with the following message:Fatal Error: Cannot read configuration file /home/(user)/.todo/config
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
make install CONFIG_DIR=/home/(user)/.local/config INSTALL_DIR=/home/(user)/.local/bin BASH_COMPLETION=/home/(user)/.bash_completion.d
~/.local/bin/todo.sh -h
What is the expected behavior?
Either the
make install
command should set something intodo.sh
to know what theCONFIG_DIR
/sysconfdir
was set to or Update the README to at least note thattodo.sh
only searches for the config file in the list of specific locations.Which versions todo.sh are you using?
Which Operating System are you using?
Ubuntu 20.04 LTS via WSL2
Which version of bash are you using?
The text was updated successfully, but these errors were encountered: