diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-08-21 23:40:12 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-08-24 16:37:09 +0200 |
commit | 4be1f8dc01013e4dee2b99026cd3b806ea7253c4 (patch) | |
tree | 230595d13f11659f57605a33ccba2c1375f7c079 /docs | |
parent | 98c94596f5928840177b6bd3c7b0f0dd03a431af (diff) | |
download | curl-4be1f8dc01013e4dee2b99026cd3b806ea7253c4.tar.gz |
curl: support XDG_CONFIG_HOME to find .curlrc
Added test433 to verify. Updated documentation.
Reviewed-by: Jay Satiro
Suggested-by: Eli Schwartz
Fixes #5829
Closes #5837
Diffstat (limited to 'docs')
-rw-r--r-- | docs/cmdline-opts/config.d | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/docs/cmdline-opts/config.d b/docs/cmdline-opts/config.d index df3d39220..be46f7598 100644 --- a/docs/cmdline-opts/config.d +++ b/docs/cmdline-opts/config.d @@ -34,13 +34,19 @@ When curl is invoked, it (unless --disable is used) checks for a default config file and uses it if found. The default config file is checked for in the following places in this order: -1) curl tries to find the "home dir": It first checks for the CURL_HOME and -then the HOME environment variables. Failing that, it uses getpwuid() on -Unix-like systems (which returns the home dir given the current user in your -system). On Windows, it then checks for the APPDATA variable, or as a last -resort the '%USERPROFILE%\\Application Data'. +1) Use the CURL_HOME environment variable if set -2) On windows, if there is no .curlrc file in the home dir, it checks for one +2) Use the XDG_CONFIG_HOME environment variable if set (Added in 7.73.0) + +3) Use the HOME environment variable if set + +4) Non-windows: use getpwuid to find the home directory + +5) Windows: use APPDATA if set + +6) Windows: use "USERPROFILE\Application Data" if set + +7) On windows, if there is no .curlrc file in the home dir, it checks for one in the same dir the curl executable is placed. On Unix-like systems, it will simply try to load .curlrc from the determined home dir. |