cmdline-docs: use .IP consistently

Remove use of .TP and some .B. The idea is to reduce nroff syntax as
much as possible and to use it consistently. Ultimately, we should be
able to introduce our own easier-to-use-and-read syntax/formatting and
convert on generation time.

Closes #12535
This commit is contained in:
Daniel Stenberg 2023-12-16 11:46:31 +01:00
parent 1e9db6997a
commit 67211e9540
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
8 changed files with 110 additions and 212 deletions

View File

@ -101,12 +101,12 @@ Here is an example of a header file contents:
another header another header
To support sending multipart mail messages, the syntax is extended as follows: To support sending multipart mail messages, the syntax is extended as follows:
.br
- name can be omitted: the equal sign is the first character of the argument, - name can be omitted: the equal sign is the first character of the argument,
.br
- if data starts with '(', this signals to start a new multipart: it can be - if data starts with '(', this signals to start a new multipart: it can be
followed by a content type specification. followed by a content type specification.
.br
- a multipart can be terminated with a '=)' argument. - a multipart can be terminated with a '=)' argument.
Example: the following command sends an SMTP mime email consisting in an Example: the following command sends an SMTP mime email consisting in an

View File

@ -13,33 +13,23 @@ Tells curl to limit what protocols it may use for transfers. Protocols are
evaluated left to right, are comma separated, and are each a protocol name or evaluated left to right, are comma separated, and are each a protocol name or
'all', optionally prefixed by zero or more modifiers. Available modifiers are: 'all', optionally prefixed by zero or more modifiers. Available modifiers are:
.RS .RS
.TP 3 .IP +
.B +
Permit this protocol in addition to protocols already permitted (this is Permit this protocol in addition to protocols already permitted (this is
the default if no modifier is used). the default if no modifier is used).
.TP .IP -
.B -
Deny this protocol, removing it from the list of protocols already permitted. Deny this protocol, removing it from the list of protocols already permitted.
.TP .IP =
.B =
Permit only this protocol (ignoring the list already permitted), though Permit only this protocol (ignoring the list already permitted), though
subject to later modification by subsequent entries in the comma separated subject to later modification by subsequent entries in the comma separated
list. list.
.RE .RE
.IP .IP
For example: For example: --proto -ftps uses the default protocols, but disables ftps
.RS
.TP 15 --proto -all,https,+http only enables http and https
.B --proto -ftps
uses the default protocols, but disables ftps --proto =http,https also only enables http and https
.TP
.B --proto -all,https,+http
only enables http and https
.TP
.B --proto =http,https
also only enables http and https
.RE
.IP
Unknown and disabled protocols produce a warning. This allows scripts to Unknown and disabled protocols produce a warning. This allows scripts to
safely rely on being able to disable potentially dangerous protocols, without safely rely on being able to disable potentially dangerous protocols, without
relying upon support for that protocol being built into curl to avoid an error. relying upon support for that protocol being built into curl to avoid an error.

View File

@ -35,53 +35,41 @@ itself before sending them to the server. File names may be quoted
shell-style to embed spaces or special characters. Following is the list of shell-style to embed spaces or special characters. Following is the list of
all supported SFTP quote commands: all supported SFTP quote commands:
.RS .RS
.TP .IP "atime date file"
**"atime date file"**
The atime command sets the last access time of the file named by the file The atime command sets the last access time of the file named by the file
operand. The <date expression> can be all sorts of date strings, see the operand. The <date expression> can be all sorts of date strings, see the
*curl_getdate(3)* man page for date expression details. (Added in 7.73.0) *curl_getdate(3)* man page for date expression details. (Added in 7.73.0)
.TP .IP "chgrp group file"
**"chgrp group file"**
The chgrp command sets the group ID of the file named by the file operand to The chgrp command sets the group ID of the file named by the file operand to
the group ID specified by the group operand. The group operand is a decimal the group ID specified by the group operand. The group operand is a decimal
integer group ID. integer group ID.
.TP .IP "chmod mode file"
**"chmod mode file"**
The chmod command modifies the file mode bits of the specified file. The The chmod command modifies the file mode bits of the specified file. The
mode operand is an octal integer mode number. mode operand is an octal integer mode number.
.TP .IP "chown user file"
**"chown user file"**
The chown command sets the owner of the file named by the file operand to the The chown command sets the owner of the file named by the file operand to the
user ID specified by the user operand. The user operand is a decimal user ID specified by the user operand. The user operand is a decimal
integer user ID. integer user ID.
.TP .IP "ln source_file target_file"
**"ln source_file target_file"**
The ln and symlink commands create a symbolic link at the target_file location The ln and symlink commands create a symbolic link at the target_file location
pointing to the source_file location. pointing to the source_file location.
.TP .IP "mkdir directory_name"
**"mkdir directory_name"**
The mkdir command creates the directory named by the directory_name operand. The mkdir command creates the directory named by the directory_name operand.
.TP .IP "mtime date file"
**"mtime date file"**
The mtime command sets the last modification time of the file named by the The mtime command sets the last modification time of the file named by the
file operand. The <date expression> can be all sorts of date strings, see the file operand. The <date expression> can be all sorts of date strings, see the
*curl_getdate(3)* man page for date expression details. (Added in 7.73.0) *curl_getdate(3)* man page for date expression details. (Added in 7.73.0)
.TP .IP "pwd"
**"pwd"**
The pwd command returns the absolute path name of the current working directory. The pwd command returns the absolute path name of the current working directory.
.TP .IP "rename source target"
**"rename source target"**
The rename command renames the file or directory named by the source The rename command renames the file or directory named by the source
operand to the destination path named by the target operand. operand to the destination path named by the target operand.
.TP .IP "rm file"
**"rm file"**
The rm command removes the file specified by the file operand. The rm command removes the file specified by the file operand.
.TP .IP "rmdir directory"
**"rmdir directory"**
The rmdir command removes the directory entry specified by the directory The rmdir command removes the directory entry specified by the directory
operand, provided it is empty. operand, provided it is empty.
.TP .IP "symlink source_file target_file"
**"symlink source_file target_file"**
See ln. See ln.
.RE .RE
.IP .IP

View File

@ -14,23 +14,17 @@ Multi: single
Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP
server or a local FILE. Ranges can be specified in a number of ways. server or a local FILE. Ranges can be specified in a number of ways.
.RS .RS
.TP 10 .IP 0-499
.B 0-499
specifies the first 500 bytes specifies the first 500 bytes
.TP .IP 500-999
.B 500-999
specifies the second 500 bytes specifies the second 500 bytes
.TP .IP -500
.B -500
specifies the last 500 bytes specifies the last 500 bytes
.TP .IP 9500-
.B 9500-
specifies the bytes from offset 9500 and forward specifies the bytes from offset 9500 and forward
.TP .IP 0-0,-1
.B 0-0,-1
specifies the first and last byte only(*)(HTTP) specifies the first and last byte only(*)(HTTP)
.TP .IP 100-199,500-599
.B 100-199,500-599
specifies two separate 100-byte ranges(*) (HTTP) specifies two separate 100-byte ranges(*) (HTTP)
.RE .RE
.IP .IP

View File

@ -16,8 +16,7 @@ Change the method to use when starting the transfer.
curl passes on the verbatim string you give it its the request without any curl passes on the verbatim string you give it its the request without any
filter or other safe guards. That includes white space and control characters. filter or other safe guards. That includes white space and control characters.
.RS .RS
.TP 15 .IP HTTP
**HTTP**
Specifies a custom request method to use when communicating with the HTTP Specifies a custom request method to use when communicating with the HTTP
server. The specified request method is used instead of the method otherwise server. The specified request method is used instead of the method otherwise
used (which defaults to *GET*). Read the HTTP 1.1 specification for details used (which defaults to *GET*). Read the HTTP 1.1 specification for details
@ -36,19 +35,15 @@ The method string you set with --request is used for all requests, which
if you for example use --location may cause unintended side-effects when curl if you for example use --location may cause unintended side-effects when curl
does not change request method according to the HTTP 30x response codes - and does not change request method according to the HTTP 30x response codes - and
similar. similar.
.TP .IP FTP
**FTP**
Specifies a custom FTP command to use instead of *LIST* when doing file lists Specifies a custom FTP command to use instead of *LIST* when doing file lists
with FTP. with FTP.
.TP .IP POP3
**POP3**
Specifies a custom POP3 command to use instead of *LIST* or *RETR*. Specifies a custom POP3 command to use instead of *LIST* or *RETR*.
(Added in 7.26.0) (Added in 7.26.0)
.TP .IP IMAP
**IMAP**
Specifies a custom IMAP command to use instead of *LIST*. (Added in 7.30.0) Specifies a custom IMAP command to use instead of *LIST*. (Added in 7.30.0)
.TP .IP SMTP
**SMTP**
Specifies a custom SMTP command to use instead of *HELP* or **VRFY**. (Added in 7.34.0) Specifies a custom SMTP command to use instead of *HELP* or **VRFY**. (Added in 7.34.0)
.RE .RE
.IP .IP

View File

@ -13,11 +13,11 @@ Multi: append
Pass options to the telnet protocol. Supported options are: Pass options to the telnet protocol. Supported options are:
.RS .RS
.TP 15 .IP "TTYPE=<term>"
**TTYPE**=<term> Sets the terminal type. Sets the terminal type.
.TP .IP "XDISPLOC=<X display>"
**XDISPLOC**=<X display> Sets the X display location. Sets the X display location.
.TP .IP "NEW_ENV=<var,val>"
**NEW_ENV**=<var,val> Sets an environment variable. Sets an environment variable.
.RE .RE
.IP .IP

View File

@ -39,17 +39,13 @@ error.
Available functions: Available functions:
.RS .RS
.TP 15 .IP trim
**trim**
removes all leading and trailing white space. removes all leading and trailing white space.
.TP .IP json
**json**
outputs the content using JSON string quoting rules. outputs the content using JSON string quoting rules.
.TP .IP url
**url**
shows the content URL (percent) encoded. shows the content URL (percent) encoded.
.TP .IP b64
**b64**
expands the variable base64 encoded expands the variable base64 encoded
.RE .RE
.IP .IP

View File

@ -46,31 +46,24 @@ the % cannot be escaped and unintended expansion is possible.
The variables available are: The variables available are:
.RS .RS
.TP 15 .IP certs
**certs**
Output the certificate chain with details. Supported only by the OpenSSL, Output the certificate chain with details. Supported only by the OpenSSL,
GnuTLS, Schannel and Secure Transport backends. (Added in 7.88.0) GnuTLS, Schannel and Secure Transport backends. (Added in 7.88.0)
.TP .IP content_type
**content_type**
The Content-Type of the requested document, if there was any. The Content-Type of the requested document, if there was any.
.TP .IP errormsg
**errormsg**
The error message. (Added in 7.75.0) The error message. (Added in 7.75.0)
.TP .IP exitcode
**exitcode**
The numerical exit code of the transfer. (Added in 7.75.0) The numerical exit code of the transfer. (Added in 7.75.0)
.TP .IP filename_effective
**filename_effective**
The ultimate filename that curl writes out to. This is only meaningful if curl The ultimate filename that curl writes out to. This is only meaningful if curl
is told to write to a file with the --remote-name or --output is told to write to a file with the --remote-name or --output
option. It's most useful in combination with the --remote-header-name option. It's most useful in combination with the --remote-header-name
option. (Added in 7.26.0) option. (Added in 7.26.0)
.TP .IP ftp_entry_path
**ftp_entry_path**
The initial path curl ended up in when logging on to the remote FTP The initial path curl ended up in when logging on to the remote FTP
server. (Added in 7.15.4) server. (Added in 7.15.4)
.TP .IP header_json
**header_json**
A JSON object with all HTTP response headers from the recent transfer. Values A JSON object with all HTTP response headers from the recent transfer. Values
are provided as arrays, since in the case of multiple headers there can be are provided as arrays, since in the case of multiple headers there can be
multiple values. (Added in 7.83.0) multiple values. (Added in 7.83.0)
@ -78,214 +71,156 @@ multiple values. (Added in 7.83.0)
The header names provided in lowercase, listed in order of appearance over the The header names provided in lowercase, listed in order of appearance over the
wire. Except for duplicated headers. They are grouped on the first occurrence wire. Except for duplicated headers. They are grouped on the first occurrence
of that header, each value is presented in the JSON array. of that header, each value is presented in the JSON array.
.TP .IP http_code
**http_code**
The numerical response code that was found in the last retrieved HTTP(S) or The numerical response code that was found in the last retrieved HTTP(S) or
FTP(s) transfer. FTP(s) transfer.
.TP .IP http_connect
**http_connect**
The numerical code that was found in the last response (from a proxy) to a The numerical code that was found in the last response (from a proxy) to a
curl CONNECT request. (Added in 7.12.4) curl CONNECT request. (Added in 7.12.4)
.TP .IP http_version
**http_version**
The http version that was effectively used. (Added in 7.50.0) The http version that was effectively used. (Added in 7.50.0)
.TP .IP json
**json**
A JSON object with all available keys. (Added in 7.70.0) A JSON object with all available keys. (Added in 7.70.0)
.TP .IP local_ip
**local_ip**
The IP address of the local end of the most recently done connection - can be The IP address of the local end of the most recently done connection - can be
either IPv4 or IPv6. (Added in 7.29.0) either IPv4 or IPv6. (Added in 7.29.0)
.TP .IP local_port
**local_port**
The local port number of the most recently done connection. (Added in 7.29.0) The local port number of the most recently done connection. (Added in 7.29.0)
.TP .IP method
**method**
The http method used in the most recent HTTP request. (Added in 7.72.0) The http method used in the most recent HTTP request. (Added in 7.72.0)
.TP .IP num_certs
**num_certs**
Number of server certificates received in the TLS handshake. Supported only by Number of server certificates received in the TLS handshake. Supported only by
the OpenSSL, GnuTLS, Schannel and Secure Transport backends. the OpenSSL, GnuTLS, Schannel and Secure Transport backends.
(Added in 7.88.0) (Added in 7.88.0)
.TP .IP num_connects
**num_connects**
Number of new connects made in the recent transfer. (Added in 7.12.3) Number of new connects made in the recent transfer. (Added in 7.12.3)
.TP .IP num_headers
**num_headers**
The number of response headers in the most recent request (restarted at each The number of response headers in the most recent request (restarted at each
redirect). Note that the status line IS NOT a header. (Added in 7.73.0) redirect). Note that the status line IS NOT a header. (Added in 7.73.0)
.TP .IP num_redirects
**num_redirects**
Number of redirects that were followed in the request. (Added in 7.12.3) Number of redirects that were followed in the request. (Added in 7.12.3)
.TP .IP onerror
**onerror**
The rest of the output is only shown if the transfer returned a non-zero error. The rest of the output is only shown if the transfer returned a non-zero error.
(Added in 7.75.0) (Added in 7.75.0)
.TP .IP "proxy_ssl_verify_result"
**proxy_ssl_verify_result**
The result of the HTTPS proxy's SSL peer certificate verification that was The result of the HTTPS proxy's SSL peer certificate verification that was
requested. 0 means the verification was successful. (Added in 7.52.0) requested. 0 means the verification was successful. (Added in 7.52.0)
.TP .IP redirect_url
**redirect_url**
When an HTTP request was made without --location to follow redirects (or when When an HTTP request was made without --location to follow redirects (or when
--max-redirs is met), this variable shows the actual URL a redirect --max-redirs is met), this variable shows the actual URL a redirect
*would* have gone to. (Added in 7.18.2) *would* have gone to. (Added in 7.18.2)
.TP .IP referer
**referer**
The Referer: header, if there was any. (Added in 7.76.0) The Referer: header, if there was any. (Added in 7.76.0)
.TP .IP remote_ip
**remote_ip**
The remote IP address of the most recently done connection - can be either The remote IP address of the most recently done connection - can be either
IPv4 or IPv6. (Added in 7.29.0) IPv4 or IPv6. (Added in 7.29.0)
.TP .IP remote_port
**remote_port**
The remote port number of the most recently done connection. (Added in 7.29.0) The remote port number of the most recently done connection. (Added in 7.29.0)
.TP .IP response_code
**response_code**
The numerical response code that was found in the last transfer (formerly The numerical response code that was found in the last transfer (formerly
known as "http_code"). (Added in 7.18.2) known as "http_code"). (Added in 7.18.2)
.TP .IP scheme
**scheme**
The URL scheme (sometimes called protocol) that was effectively used. (Added in 7.52.0) The URL scheme (sometimes called protocol) that was effectively used. (Added in 7.52.0)
.TP .IP size_download
**size_download**
The total amount of bytes that were downloaded. This is the size of the The total amount of bytes that were downloaded. This is the size of the
body/data that was transferred, excluding headers. body/data that was transferred, excluding headers.
.TP .IP size_header
**size_header**
The total amount of bytes of the downloaded headers. The total amount of bytes of the downloaded headers.
.TP .IP size_request
**size_request**
The total amount of bytes that were sent in the HTTP request. The total amount of bytes that were sent in the HTTP request.
.TP .IP size_upload
**size_upload**
The total amount of bytes that were uploaded. This is the size of the The total amount of bytes that were uploaded. This is the size of the
body/data that was transferred, excluding headers. body/data that was transferred, excluding headers.
.TP .IP speed_download
**speed_download**
The average download speed that curl measured for the complete download. Bytes The average download speed that curl measured for the complete download. Bytes
per second. per second.
.TP .IP speed_upload
**speed_upload**
The average upload speed that curl measured for the complete upload. Bytes per The average upload speed that curl measured for the complete upload. Bytes per
second. second.
.TP .IP ssl_verify_result
**ssl_verify_result**
The result of the SSL peer certificate verification that was requested. 0 The result of the SSL peer certificate verification that was requested. 0
means the verification was successful. (Added in 7.19.0) means the verification was successful. (Added in 7.19.0)
.TP .IP stderr
**stderr**
From this point on, the --write-out output is written to standard From this point on, the --write-out output is written to standard
error. (Added in 7.63.0) error. (Added in 7.63.0)
.TP .IP stdout
**stdout**
From this point on, the --write-out output is written to standard output. From this point on, the --write-out output is written to standard output.
This is the default, but can be used to switch back after switching to stderr. This is the default, but can be used to switch back after switching to stderr.
(Added in 7.63.0) (Added in 7.63.0)
.TP .IP time_appconnect
**time_appconnect**
The time, in seconds, it took from the start until the SSL/SSH/etc The time, in seconds, it took from the start until the SSL/SSH/etc
connect/handshake to the remote host was completed. (Added in 7.19.0) connect/handshake to the remote host was completed. (Added in 7.19.0)
.TP .IP time_connect
**time_connect**
The time, in seconds, it took from the start until the TCP connect to the The time, in seconds, it took from the start until the TCP connect to the
remote host (or proxy) was completed. remote host (or proxy) was completed.
.TP .IP time_namelookup
**time_namelookup**
The time, in seconds, it took from the start until the name resolving was The time, in seconds, it took from the start until the name resolving was
completed. completed.
.TP .IP time_pretransfer
**time_pretransfer**
The time, in seconds, it took from the start until the file transfer was just The time, in seconds, it took from the start until the file transfer was just
about to begin. This includes all pre-transfer commands and negotiations that about to begin. This includes all pre-transfer commands and negotiations that
are specific to the particular protocol(s) involved. are specific to the particular protocol(s) involved.
.TP .IP time_redirect
**time_redirect**
The time, in seconds, it took for all redirection steps including name lookup, The time, in seconds, it took for all redirection steps including name lookup,
connect, pretransfer and transfer before the final transaction was connect, pretransfer and transfer before the final transaction was
started. time_redirect shows the complete execution time for multiple started. time_redirect shows the complete execution time for multiple
redirections. (Added in 7.12.3) redirections. (Added in 7.12.3)
.TP .IP time_starttransfer
**time_starttransfer**
The time, in seconds, it took from the start until the first byte is received. The time, in seconds, it took from the start until the first byte is received.
This includes time_pretransfer and also the time the server needed to calculate This includes time_pretransfer and also the time the server needed to calculate
the result. the result.
.TP .IP time_total
**time_total**
The total time, in seconds, that the full operation lasted. The total time, in seconds, that the full operation lasted.
.TP .IP url
**url**
The URL that was fetched. (Added in 7.75.0) The URL that was fetched. (Added in 7.75.0)
.TP .IP url.scheme
**url.scheme**
The scheme part of the URL that was fetched. (Added in 8.1.0) The scheme part of the URL that was fetched. (Added in 8.1.0)
.TP .IP url.user
**url.user**
The user part of the URL that was fetched. (Added in 8.1.0) The user part of the URL that was fetched. (Added in 8.1.0)
.TP .IP url.password
**url.password**
The password part of the URL that was fetched. (Added in 8.1.0) The password part of the URL that was fetched. (Added in 8.1.0)
.TP .IP url.options
**url.options**
The options part of the URL that was fetched. (Added in 8.1.0) The options part of the URL that was fetched. (Added in 8.1.0)
.TP .IP url.host
**url.host**
The host part of the URL that was fetched. (Added in 8.1.0) The host part of the URL that was fetched. (Added in 8.1.0)
.TP .IP url.port
**url.port**
The port number of the URL that was fetched. If no port number was specified, The port number of the URL that was fetched. If no port number was specified,
but the URL scheme is known, that scheme's default port number is but the URL scheme is known, that scheme's default port number is
shown. (Added in 8.1.0) shown. (Added in 8.1.0)
.TP .IP url.path
**url.path**
The path part of the URL that was fetched. (Added in 8.1.0) The path part of the URL that was fetched. (Added in 8.1.0)
.TP .IP url.query
**url.query**
The query part of the URL that was fetched. (Added in 8.1.0) The query part of the URL that was fetched. (Added in 8.1.0)
.TP .IP url.fragment
**url.fragment**
The fragment part of the URL that was fetched. (Added in 8.1.0) The fragment part of the URL that was fetched. (Added in 8.1.0)
.TP .IP url.zoneid
**url.zoneid**
The zone id part of the URL that was fetched. (Added in 8.1.0) The zone id part of the URL that was fetched. (Added in 8.1.0)
.TP .IP urle.scheme
**urle.scheme**
The scheme part of the effective (last) URL that was fetched. (Added in 8.1.0) The scheme part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urle.user
**urle.user**
The user part of the effective (last) URL that was fetched. (Added in 8.1.0) The user part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urle.password
**urle.password**
The password part of the effective (last) URL that was fetched. (Added in 8.1.0) The password part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urle.options
**urle.options**
The options part of the effective (last) URL that was fetched. (Added in 8.1.0) The options part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urle.host
**urle.host**
The host part of the effective (last) URL that was fetched. (Added in 8.1.0) The host part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urle.port
**urle.port**
The port number of the effective (last) URL that was fetched. If no port The port number of the effective (last) URL that was fetched. If no port
number was specified, but the URL scheme is known, that scheme's default port number was specified, but the URL scheme is known, that scheme's default port
number is shown. (Added in 8.1.0) number is shown. (Added in 8.1.0)
.TP .IP urle.path
**urle.path**
The path part of the effective (last) URL that was fetched. (Added in 8.1.0) The path part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urle.query
**urle.query**
The query part of the effective (last) URL that was fetched. (Added in 8.1.0) The query part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urle.fragment
**urle.fragment**
The fragment part of the effective (last) URL that was fetched. (Added in 8.1.0) The fragment part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urle.zoneid
**urle.zoneid**
The zone id part of the effective (last) URL that was fetched. (Added in 8.1.0) The zone id part of the effective (last) URL that was fetched. (Added in 8.1.0)
.TP .IP urlnum
**urlnum**
The URL index number of this transfer, 0-indexed. Unglobbed URLs share the The URL index number of this transfer, 0-indexed. Unglobbed URLs share the
same index number as the origin globbed URL. (Added in 7.75.0) same index number as the origin globbed URL. (Added in 7.75.0)
.TP .IP url_effective
**url_effective**
The URL that was fetched last. This is most meaningful if you have told curl The URL that was fetched last. This is most meaningful if you have told curl
to follow location: headers. to follow location: headers.
.RE .RE