]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
managen: introduce "Multi: per-URL"
authorDaniel Stenberg <daniel@haxx.se>
Thu, 27 Jun 2024 20:54:28 +0000 (22:54 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 28 Jun 2024 06:42:47 +0000 (08:42 +0200)
For -O, -o and -T that are used once per specified URL.

Closes #14045

docs/cmdline-opts/MANPAGE.md
docs/cmdline-opts/output.md
docs/cmdline-opts/remote-name.md
docs/cmdline-opts/upload-file.md
scripts/managen

index 1f9749bc51b3c0e897ca838f60f3bdb07d90faf2..3e2e7151f65930181d4e0f4398f4ecea2bd74ada 100644 (file)
@@ -45,7 +45,7 @@ A line that starts with `<!--` is a comment. It should also end with `-->`.
     Help: (short text for the --help output for this option)
     Long: (long form name, without dashes)
     Magic: (description of "magic" options)
-    Multi: single/append/boolean/mutex/custom (if used more than once)
+    Multi: single/append/boolean/mutex/custom/per-URL (if used more than once)
     Mutexed: (space separated list of options this overrides, no dashes)
     Protocols: (space separated list for which protocols this option works)
     Requires: (space separated list of features this requires, no dashes)
index 53f658327232f0d45aee8f5e56df9424a078acc9..548e02f15c0b348a1002086e49304bc0e243c414 100644 (file)
@@ -7,7 +7,7 @@ Short: o
 Help: Write to file instead of stdout
 Category: important curl
 Added: 4.0
-Multi: append
+Multi: per-URL
 See-also:
   - remote-name
   - remote-name-all
index 5d2fcdcb2b676de491e28a6c26de6010c0dd897f..041800fa921d385c1012c1b7b36dad5b5a87f6de 100644 (file)
@@ -6,13 +6,14 @@ Short: O
 Help: Write output to file named as remote file
 Category: important output
 Added: 4.0
-Multi: append
+Multi: per-URL
 See-also:
   - remote-name-all
   - output-dir
   - remote-header-name
 Example:
   - -O https://example.com/filename
+  - -O https://example.com/filename -O https://example.com/file2
 ---
 
 # `--remote-name`
index 74e7af3025f5e496899f00c10c6913a180f77e17..7e9ffbf1e68a58ecad4e6b6042f81b9d900dfb8d 100644 (file)
@@ -7,7 +7,7 @@ Arg: <file>
 Help: Transfer local FILE to destination
 Category: important upload
 Added: 4.0
-Multi: append
+Multi: per-URL
 See-also:
   - get
   - head
@@ -17,6 +17,7 @@ Example:
   - -T file $URL
   - -T "img[1-1000].png" ftp://ftp.example.com/
   - --upload-file "{file1,file2}" $URL
+  - -T file -T file2 $URL $URL
 ---
 
 # `--upload-file`
index f384f8953e66551df20cab638a2a8970a35475dc..8c057355cc7e4c8a2e20052c76c1dfe495bf5848 100755 (executable)
@@ -704,6 +704,11 @@ sub single {
     elsif($multi eq "custom") {
         ; # left for the text to describe
     }
+    elsif($multi eq "per-URL") {
+        push @extra,
+            "${pre}--$long is associated with a single URL. Use it once per URL\n".
+            "when you use several URLs in a command line.\n";
+    }
     else {
         print STDERR "$f:$line:1:ERROR: unrecognized Multi: '$multi'\n";
         return 2;