summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-11-19 17:09:51 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-11-29 00:57:39 +0100
commit6ad053060d213ef356d3f3943784620b4deea05a (patch)
treed1caccbd9fa0af4be1279991133ee85a241942ac
parent2be1aa619bca699e2850baf53c7cc3561f1c1ac2 (diff)
downloadcurl-bagder/homedir-scan.tar.gz
config.d: update documentation to match the path searchbagder/homedir-scan
Assisted-by: Jay Satiro
-rw-r--r--docs/cmdline-opts/config.d45
1 files changed, 22 insertions, 23 deletions
diff --git a/docs/cmdline-opts/config.d b/docs/cmdline-opts/config.d
index dfeb0ec7e..b24a87e1c 100644
--- a/docs/cmdline-opts/config.d
+++ b/docs/cmdline-opts/config.d
@@ -36,38 +36,37 @@ line. So, it could look similar to this:
url = "https://curl.se/docs/"
+ # --- Example file ---
+ # this is a comment
+ url = "example.com"
+ output = "curlhere.html"
+ user-agent = "superagent/1.0"
+
+ # and fetch another URL too
+ url = "example.com/docs/manpage.html"
+ -O
+ referer = "http://nowhereatall.example.com/"
+ # --- End of example file ---
+
When curl is invoked, it (unless --disable is used) checks for a default
-config file and uses it if found, even when this option is used. The default
+config file and uses it if found, even when --config is used. The default
config file is checked for in the following places in this order:
-1) Use the CURL_HOME environment variable if set
-
-2) Use the XDG_CONFIG_HOME environment variable if set (Added in 7.73.0)
+1) "$CURL_HOME/.curlrc"
-3) Use the HOME environment variable if set
+2) "$XDG_CONFIG_HOME/.curlrc" (Added in 7.73.0)
-4) Non-windows: use getpwuid to find the home directory
+3) "$HOME/.curlrc"
-5) Windows: use APPDATA if set
+4) Windows: "%USERPROFILE%\\.curlrc"
-6) Windows: use "USERPROFILE\\Application Data" if set
+5) Windows: "%APPDATA%\\.curlrc"
-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.
+6) Windows: "%USERPROFILE%\\Application Data\\.curlrc"
-.nf
-# --- Example file ---
-# this is a comment
-url = "example.com"
-output = "curlhere.html"
-user-agent = "superagent/1.0"
+7) Non-windows: use getpwuid to find the home directory
-# and fetch another URL too
-url = "example.com/docs/manpage.html"
--O
-referer = "http://nowhereatall.example.com/"
-# --- End of example file ---
-.fi
+8) On windows, if it finds no .curlrc file in the sequence described above, it
+checks for one in the same dir the curl executable is placed.
This option can be used multiple times to load multiple config files.