[CONFIG/CORE] More default config locations
See original GitHub issueIs your feature request related to a problem? Please describe.
From my experience, a “silent” convention that Linux developers have is not to “clutter” a home directory with config files/directories, but rather store them in the .config
folder.
Describe the solution you’d like A solution for this problem is one I have seen frequently used is to actually have the product search in a couple (usually 2-3) locations for the specific config file (the name should always be the exact one the product expects). For example, vim searches, IIRC, the following:
~/.vimrc
~./.config/.vimrc
(or~./.config/vimrc
, I am not entirely sure)~./.config/vim/.vimrc
(or~./.config/vim/vimrc
, again sorry for not being too sure)
I think CT could benefit from such a system, even on other OSs, such as Windows, for which it could define a different set of paths (i.e. C:\Users\myusername\Documents\...
).
Describe alternatives you’ve considered ~I could not come up with any satisfying alternatives for this issue, at the time of writing.~ After taking a look at the config file, since it only holds git-related info in it, an alternative would be to use the global git config (at least as a default , maybe).
Additional context As @Zethson mentioned in #218, I think it would actually be great to include the option to specify a config file in the command call, as some might want to use a different config only for a project/once/testing.
Usage example:
cookietemple -c /path/to/the/config/file ...
# or
cookietemple --config /path/to/the/config/file ...
Issue Analytics
- State:
- Created 3 years ago
- Comments:34 (16 by maintainers)
We decided to roll with the library.
IMO The code will look more ugly if we write this ourselves. Their methods handle the OS themselves and that bs is therefore hidden to us and doesn’t pollute cookietemple.
@Imipenem Let’s discuss this again tonight and we will finalize the decision and go with whatever