managen: introduce "Multi: per-URL"
For -O, -o and -T that are used once per specified URL. Closes #14045
This commit is contained in:
parent
9acf759455
commit
2d3a51e367
@ -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)
|
Help: (short text for the --help output for this option)
|
||||||
Long: (long form name, without dashes)
|
Long: (long form name, without dashes)
|
||||||
Magic: (description of "magic" options)
|
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)
|
Mutexed: (space separated list of options this overrides, no dashes)
|
||||||
Protocols: (space separated list for which protocols this option works)
|
Protocols: (space separated list for which protocols this option works)
|
||||||
Requires: (space separated list of features this requires, no dashes)
|
Requires: (space separated list of features this requires, no dashes)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Short: o
|
|||||||
Help: Write to file instead of stdout
|
Help: Write to file instead of stdout
|
||||||
Category: important curl
|
Category: important curl
|
||||||
Added: 4.0
|
Added: 4.0
|
||||||
Multi: append
|
Multi: per-URL
|
||||||
See-also:
|
See-also:
|
||||||
- remote-name
|
- remote-name
|
||||||
- remote-name-all
|
- remote-name-all
|
||||||
|
|||||||
@ -6,13 +6,14 @@ Short: O
|
|||||||
Help: Write output to file named as remote file
|
Help: Write output to file named as remote file
|
||||||
Category: important output
|
Category: important output
|
||||||
Added: 4.0
|
Added: 4.0
|
||||||
Multi: append
|
Multi: per-URL
|
||||||
See-also:
|
See-also:
|
||||||
- remote-name-all
|
- remote-name-all
|
||||||
- output-dir
|
- output-dir
|
||||||
- remote-header-name
|
- remote-header-name
|
||||||
Example:
|
Example:
|
||||||
- -O https://example.com/filename
|
- -O https://example.com/filename
|
||||||
|
- -O https://example.com/filename -O https://example.com/file2
|
||||||
---
|
---
|
||||||
|
|
||||||
# `--remote-name`
|
# `--remote-name`
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Arg: <file>
|
|||||||
Help: Transfer local FILE to destination
|
Help: Transfer local FILE to destination
|
||||||
Category: important upload
|
Category: important upload
|
||||||
Added: 4.0
|
Added: 4.0
|
||||||
Multi: append
|
Multi: per-URL
|
||||||
See-also:
|
See-also:
|
||||||
- get
|
- get
|
||||||
- head
|
- head
|
||||||
@ -17,6 +17,7 @@ Example:
|
|||||||
- -T file $URL
|
- -T file $URL
|
||||||
- -T "img[1-1000].png" ftp://ftp.example.com/
|
- -T "img[1-1000].png" ftp://ftp.example.com/
|
||||||
- --upload-file "{file1,file2}" $URL
|
- --upload-file "{file1,file2}" $URL
|
||||||
|
- -T file -T file2 $URL $URL
|
||||||
---
|
---
|
||||||
|
|
||||||
# `--upload-file`
|
# `--upload-file`
|
||||||
|
|||||||
@ -704,6 +704,11 @@ sub single {
|
|||||||
elsif($multi eq "custom") {
|
elsif($multi eq "custom") {
|
||||||
; # left for the text to describe
|
; # 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 {
|
else {
|
||||||
print STDERR "$f:$line:1:ERROR: unrecognized Multi: '$multi'\n";
|
print STDERR "$f:$line:1:ERROR: unrecognized Multi: '$multi'\n";
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user