curl.1: provide examples for each option

The file format for each option now features a "Example:" header that
can provide one or more examples that get rendered appropriately in the
output. All options MUST have at least one example or gen.pl complains
at build-time.

This fix also does a few other minor format and consistency cleanups.

Closes #7654
This commit is contained in:
Daniel Stenberg 2021-08-31 16:37:14 +02:00
parent c905459e87
commit 68784d73c3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
245 changed files with 348 additions and 53 deletions

View file

@ -2,6 +2,7 @@ Long: retry-all-errors
Help: Retry all errors (use with --retry)
Added: 7.71.0
Category: curl
Example: --retry-all-errors $URL
---
Retry on any error. This option is used together with --retry.
@ -11,13 +12,14 @@ receiving duplicate data. Do not use with redirected input or output. You'd be
much better off handling your unique problems in shell script. Please read the
example below.
Warning: For server compatibility curl attempts to retry failed flaky transfers
as close as possible to how they were started, but this is not possible with
redirected input or output. For example, before retrying it removes output data
from a failed partial transfer that was written to an output file. However this
is not true of data redirected to a | pipe or > file, which are not reset. We
strongly suggest don't parse or record output via redirect in combination with
this option, since you may receive duplicate data.
**WARNING**: For server compatibility curl attempts to retry failed flaky
transfers as close as possible to how they were started, but this is not
possible with redirected input or output. For example, before retrying it
removes output data from a failed partial transfer that was written to an
output file. However this is not true of data redirected to a | pipe or >
file, which are not reset. We strongly suggest don't parse or record output
via redirect in combination with this option, since you may receive duplicate
data.
By default curl will not error on an HTTP response code that indicates an HTTP
error, if the transfer was successful. For example, if a server replies 404