cmdline-opts: category cleanup

Option cleanups:

 --get is not upload
 --form* are post
 - added several options into ldap, smtp, imap and pop3
 - shortened the category descriptions in the list

category curl fixes:

 --create-dirs removed from 'curl'
 --ftp-create-dirs removed from 'curl'
 --netrc moved to 'auth' from 'curl'
 --netrc-file moved to 'auth' from 'curl'
 --netrc-optional moved to 'auth' from 'curl'
 --no-buffer moved to 'output' from 'curl'
 --no-clobber removed from 'curl'
 --output removed from 'curl'
 --output-dir removed from 'curl'
 --remove-on-error removed from 'curl'

Add a "global" category:

- Made all "global" options set this category

Add a "deprecated" category:

- Moved the deprecated options to it (maybe they should not be in any
 category long term)

Add a 'timeout' category

- Put a number of appropriate options in it

Add an 'ldap' category

- Put the LDAP related option in there

Remove categories "ECH" and "ipfs"

- They should not be categories. Had only one single option each.

Remove category "misc"

- It should not be a category as it is impossible to know when to browse
  it.

--use-ascii moved to ftp and output
--xattr moved to output
--service-name moved to auth

Managen fixes:

- errors if an option is given a category name that is not already setup
  for in code

- verifies that options set `scope: global` also is put in category
  `global´

Closes #14101
This commit is contained in:
Daniel Stenberg 2024-07-04 13:38:18 +02:00
parent 18c61aa036
commit 2abfc759b9
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
64 changed files with 239 additions and 204 deletions

View file

@ -32,31 +32,33 @@ curl invalid category --help
</errorcode>
<stdout mode="text">
Usage: curl [options...] <url>
Invalid category provided, here is a list of all categories:
Unknown category provided, here is a list of all categories:
auth Different types of authentication methods
connection Low level networking operations
auth Authentication methods
connection Manage connections
curl The command line tool itself
dns General DNS options
file FILE protocol options
ftp FTP protocol options
http HTTP and HTTPS protocol options
imap IMAP protocol options
misc Options that do not fit into any other category
deprecated Legacy
dns Names and resolving
file FILE protocol
ftp FTP protocol
global Global options
http HTTP and HTTPS protocol
imap IMAP protocol
ldap LDAP protocol
output Filesystem output
pop3 POP3 protocol options
post HTTP Post specific options
proxy All options related to proxies
scp SCP protocol options
sftp SFTP protocol options
smtp SMTP protocol options
ssh SSH protocol options
telnet TELNET protocol options
tftp TFTP protocol options
tls All TLS/SSL related options
ech All Encrypted Client Hello (ECH) options
upload All options for uploads
verbose Options related to any kind of command line output of curl
pop3 POP3 protocol
post HTTP POST specific
proxy Options for proxies
scp SCP protocol
sftp SFTP protocol
smtp SMTP protocol
ssh SSH protocol
telnet TELNET protocol
tftp TFTP protocol
timeout Timeouts and delays
tls TLS/SSL related
upload Upload, sending data
verbose Tracing, logging etc
</stdout>
</verify>
</testcase>

View file

@ -36,7 +36,7 @@ curl file category --help
</errorcode>
<stdout mode="text">
Usage: curl [options...] <url>
file: FILE protocol options
file: FILE protocol
--create-file-mode <mode> File mode for created files
-I, --head Show document info only
-l, --list-only List only mode

View file

@ -36,7 +36,7 @@ curl file category --help with lower/upper mix
</errorcode>
<stdout mode="text">
Usage: curl [options...] <url>
file: FILE protocol options
file: FILE protocol
--create-file-mode <mode> File mode for created files
-I, --head Show document info only
-l, --list-only List only mode

View file

@ -45,7 +45,7 @@ Short: v
Long: fakeitreal
Mutexed: trace trace-ascii
Help: Make the operation more talkative
Category: important verbose
Category: important verbose global
Added: 4.0
Multi: boolean
Scope: global

View file

@ -45,7 +45,7 @@ Short: v
Long: fakeitreal
Mutexed: trace trace-ascii
Help: Make the operation more talkative
Category: important verbose
Category: important verbose global
Added: 4.0
Multi: boolean
Scope: global