-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
respect the XDG_CONFIG_HOME environment variable #1048
Comments
it would also match git. Git also supports the XDG Base Directory Specification. |
Thanks for the suggestion! This is definitely something we could do. Now accepting pull requests 😉 |
Also, please store sensitive information (like oauth_token) under $XDG_CACHE_HOME, not $XDG_CONFIG_HOME. The latter location is often published in dotfiles, the former is usually not. |
|
Agree with @jrobeson -- This should definitely be And, further, the canonical way of utilizing those directories is for applications to create a directory for which a config, data, or cache files will then reside in, rather than putting a single file at the base of the XDG directory. So, as an example, the ideal scenario I think would be |
I think storing it as a single file is fine IF it were to be the only file. |
Thank you for using
~/.config/hub
for your configuration file, as opposed to polluting the base home directory with yet another top-level dot file (~/.hub
).It would be even better if this configuration file was relocatable. This is covered by the XDG Base Directory Specification. Basically, this means to check for the environment variable
XDG_CONFIG_HOME
. If it exists, make your configuration file relative to that (${XDG_CONFIG_HOME}/hub
). If it does not exist, make your configuration file relative to~/.config
(matching the existing behavior). Because you are already using the default relative path, it would be a backwards compatible change for existing users.The text was updated successfully, but these errors were encountered: