]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
output.d: quote the URL when globbing
authorDaniel Stenberg <daniel@haxx.se>
Sun, 29 Mar 2020 21:51:52 +0000 (23:51 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 30 Mar 2020 06:46:08 +0000 (08:46 +0200)
Some shells do globbing of their own unless the URL is quoted, so maybe
encourage this.

Co-authored-by: Jay Satiro
Closes #5160

docs/cmdline-opts/output.d
docs/cmdline-opts/page-header

index 35f52a2130303a3af2bcecbc2443189cf221a8e6..f310c267d7238f4971035ef2ef57877deba175e5 100644 (file)
@@ -5,15 +5,15 @@ Help: Write to file instead of stdout
 See-also: remote-name remote-name-all remote-header-name
 ---
 Write output to <file> instead of stdout. If you are using {} or [] to fetch
-multiple documents, you can use '#' followed by a number in the <file>
-specifier. That variable will be replaced with the current string for the URL
-being fetched. Like in:
+multiple documents, you should quote the URL and you can use '#' followed by a
+number in the <file> specifier. That variable will be replaced with the current
+string for the URL being fetched. Like in:
 
- curl http://{one,two}.example.com -o "file_#1.txt"
+ curl "http://{one,two}.example.com" -o "file_#1.txt"
 
 or use several variables like:
 
- curl http://{site,host}.host[1-5].com -o "#1_#2"
+ curl "http://{site,host}.host[1-5].com" -o "#1_#2"
 
 You may use this option as many times as the number of URLs you have. For
 example, if you specify two URLs on the same command line, you can use it like
index 51f45edadf12ed006be16029575c659b94283d3f..7b04a8240d31735d758d6e4754d39a08f508b213 100644 (file)
@@ -46,9 +46,9 @@ The URL syntax is protocol-dependent. You'll find a detailed description in
 RFC 3986.
 
 You can specify multiple URLs or parts of URLs by writing part sets within
-braces as in:
+braces and quoting the URL as in:
 
-  http://site.{one,two,three}.com
+  "http://site.{one,two,three}.com"
 
 or you can get sequences of alphanumeric series by using [] as in: