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

@ -54,7 +54,7 @@ $(ASCIIPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
$(GEN)(rm -f $(ASCIIPAGE) && @PERL@ $(MANAGEN) -d $(srcdir) -I $(INCDIR) ascii $(DPAGES) > asciipage.tmp.$$$$ && mv asciipage.tmp.$$$$ $(ASCIIPAGE))
listhelp:
$(MANAGEN) listhelp $(DPAGES) > $(top_builddir)/src/tool_listhelp.c
$(MANAGEN) -d $(srcdir) listhelp $(DPAGES) > $(top_builddir)/src/tool_listhelp.c
listcats:
@$(MANAGEN) listcats $(DPAGES)

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: connect-timeout
Arg: <seconds>
Help: Maximum time allowed to connect
Category: connection
Category: connection timeout
Added: 7.7
Multi: single
See-also:

View file

@ -3,9 +3,9 @@ c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: connect-to
Arg: <HOST1:PORT1:HOST2:PORT2>
Help: Connect to host
Help: Connect to host2 instead of host1
Added: 7.49.0
Category: connection
Category: connection dns
Multi: append
See-also:
- resolve

View file

@ -3,7 +3,7 @@ c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: create-dirs
Help: Create necessary local directory hierarchy
Category: curl output
Category: output
Added: 7.10.3
Multi: boolean
See-also:

View file

@ -5,7 +5,7 @@ Long: ech
Arg: <config>
Help: Configure ECH
Added: 8.8.0
Category: tls ECH
Category: tls
Protocols: HTTPS
Multi: single
See-also:

View file

@ -5,7 +5,7 @@ Long: egd-file
Arg: <file>
Help: EGD socket path for random data
Protocols: TLS
Category: tls
Category: deprecated
Added: 7.7
Multi: single
See-also:

View file

@ -6,7 +6,7 @@ Arg: <seconds>
Help: How long to wait for 100-continue
Protocols: HTTP
Added: 7.47.0
Category: http
Category: http timeout
Multi: single
See-also:
- connect-timeout

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: fail-early
Help: Fail on first transfer error
Added: 7.52.0
Category: curl
Category: curl global
Multi: boolean
Scope: global
See-also:

View file

@ -3,9 +3,9 @@ c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: form-escape
Help: Escape form fields using backslash
Protocols: HTTP
Protocols: HTTP imap smtp
Added: 7.81.0
Category: http upload
Category: http upload post
Multi: single
See-also:
- form

View file

@ -5,7 +5,7 @@ Long: form-string
Help: Specify multipart MIME data
Protocols: HTTP SMTP IMAP
Arg: <name=string>
Category: http upload
Category: http upload post smtp imap
Added: 7.13.2
Multi: append
See-also:

View file

@ -7,7 +7,7 @@ Arg: <name=content>
Help: Specify multipart MIME data
Protocols: HTTP SMTP IMAP
Mutexed: data head upload-file
Category: http upload
Category: http upload post imap smtp
Added: 5.0
Multi: append
See-also:

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: ftp-create-dirs
Protocols: FTP SFTP
Help: Create the remote dirs if not present
Category: ftp sftp curl
Category: ftp sftp
Added: 7.10.7
Multi: boolean
See-also:

View file

@ -5,7 +5,7 @@ Long: get
Short: G
Help: Put the post data in the URL and use GET
Protocols: HTTP
Category: http upload
Category: http
Added: 7.8.1
Multi: boolean
See-also:

View file

@ -5,7 +5,7 @@ Long: happy-eyeballs-timeout-ms
Arg: <ms>
Help: Time for IPv6 before IPv4
Added: 7.59.0
Category: connection
Category: connection timeout
Multi: single
See-also:
- max-time

View file

@ -6,7 +6,7 @@ Arg: <URL>
Help: Gateway for IPFS
Protocols: IPFS
Added: 8.4.0
Category: ipfs
Category: curl
Multi: single
See-also:
- help

View file

@ -5,7 +5,7 @@ Long: keepalive-time
Arg: <seconds>
Help: Interval time for keepalive probes
Added: 7.18.0
Category: connection
Category: connection timeout
Multi: single
See-also:
- no-keepalive

View file

@ -5,7 +5,7 @@ Long: libcurl
Arg: <file>
Help: Generate libcurl code for this command line
Added: 7.16.1
Category: curl
Category: curl global
Multi: single
Scope: global
See-also:

View file

@ -6,7 +6,7 @@ Arg: <options>
Protocols: IMAP LDAP POP3 SMTP
Help: Server login options
Added: 7.34.0
Category: imap pop3 smtp auth
Category: imap pop3 smtp auth ldap
Multi: single
See-also:
- user

View file

@ -5,7 +5,7 @@ Long: max-time
Short: m
Arg: <seconds>
Help: Maximum time allowed for transfer
Category: connection
Category: connection timeout
Added: 4.0
Multi: single
See-also:

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: metalink
Help: Process given URLs as metalink XML file
Added: 7.27.0
Category: misc
Category: deprecated
Multi: single
See-also:
- parallel

View file

@ -6,7 +6,7 @@ Help: Specify FILE for netrc
Arg: <filename>
Added: 7.21.5
Mutexed: netrc
Category: curl
Category: auth
Multi: single
See-also:
- netrc

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: netrc-optional
Help: Use either .netrc or URL
Mutexed: netrc
Category: curl
Category: auth
Added: 7.9.8
Multi: boolean
See-also:

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: netrc
Short: n
Help: Must read .netrc for username and password
Category: curl
Category: auth
Added: 4.6
Mutexed: netrc-file netrc-optional
Multi: boolean

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: no-buffer
Short: N
Help: Disable buffering of the output stream
Category: curl
Category: output
Added: 6.5
Multi: boolean
See-also:

View file

@ -3,7 +3,7 @@ c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: no-clobber
Help: Do not overwrite files that already exist
Category: curl output
Category: output
Added: 7.83.0
Multi: boolean
See-also:

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: ntlm-wb
Help: HTTP NTLM authentication with winbind
Protocols: HTTP
Category: auth http
Category: deprecated
Added: 7.22.0
Multi: mutex
See-also:

View file

@ -5,7 +5,7 @@ Long: oauth2-bearer
Help: OAuth 2 Bearer Token
Arg: <token>
Protocols: IMAP LDAP POP3 SMTP HTTP
Category: auth
Category: auth imap pop3 smtp ldap
Added: 7.33.0
Multi: single
See-also:

View file

@ -5,7 +5,7 @@ Long: output-dir
Arg: <dir>
Help: Directory to save files in
Added: 7.73.0
Category: curl output
Category: output
Multi: single
See-also:
- remote-name

View file

@ -5,7 +5,7 @@ Long: output
Arg: <file>
Short: o
Help: Write to file instead of stdout
Category: important curl output
Category: important output
Added: 4.0
Multi: per-URL
See-also:

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: parallel-immediate
Help: Do not wait for multiplexing
Added: 7.68.0
Category: connection curl
Category: connection curl global
Multi: boolean
Scope: global
See-also:

View file

@ -5,7 +5,7 @@ Long: parallel-max
Arg: <num>
Help: Maximum concurrency for parallel transfers
Added: 7.66.0
Category: connection curl
Category: connection curl global
Multi: single
Scope: global
See-also:

View file

@ -5,7 +5,7 @@ Short: Z
Long: parallel
Help: Perform transfers in parallel
Added: 7.66.0
Category: connection curl
Category: connection curl global
Multi: boolean
Scope: global
See-also:

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Short: #
Long: progress-bar
Help: Display transfer progress as a bar
Category: verbose
Category: verbose global
Added: 5.10
Multi: boolean
Scope: global

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: random-file
Arg: <file>
Help: File for reading random data from
Category: misc
Category: deprecated
Added: 7.7
Multi: single
See-also:

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: rate
Arg: <max request rate>
Help: Request rate for serial transfers
Category: connection
Category: connection global
Added: 7.84.0
Multi: single
Scope: global

View file

@ -3,7 +3,7 @@ c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: remove-on-error
Help: Remove output file on errors
Category: curl output
Category: output
Added: 7.83.0
Multi: boolean
See-also:

View file

@ -5,7 +5,7 @@ Long: request
Short: X
Arg: <method>
Help: Specify request method to use
Category: connection
Category: connection pop3 ftp imap smtp
Added: 6.0
Multi: single
See-also:

View file

@ -5,7 +5,7 @@ Long: retry-delay
Arg: <seconds>
Help: Wait time between retries
Added: 7.12.3
Category: curl
Category: curl timeout
Multi: single
See-also:
- retry

View file

@ -5,7 +5,7 @@ Long: retry-max-time
Arg: <seconds>
Help: Retry only within this period
Added: 7.12.3
Category: curl
Category: curl timeout
Multi: single
See-also:
- retry

View file

@ -5,7 +5,7 @@ Long: service-name
Help: SPNEGO service name
Arg: <name>
Added: 7.43.0
Category: misc
Category: auth
Multi: single
See-also:
- negotiate

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: show-error
Short: S
Help: Show error even when -s is used
Category: curl
Category: curl global
Added: 5.9
Multi: boolean
Scope: global

View file

@ -33,4 +33,4 @@ used with an HTTP/HTTPS proxy (added in 7.52.0). In such a case, curl first
connects to the SOCKS proxy and then connects (through SOCKS) to the HTTP or
HTTPS proxy.
This option (as well as --socks4) does not work with IPV6, FTPS or LDAP.
This option does not work with FTPS or LDAP.

View file

@ -5,7 +5,7 @@ Long: speed-time
Short: y
Arg: <seconds>
Help: Trigger 'speed-limit' abort after this time
Category: connection
Category: connection timeout
Added: 4.7
Multi: single
See-also:

View file

@ -5,7 +5,7 @@ Long: ssl-reqd
Help: Require SSL/TLS
Protocols: FTP IMAP POP3 SMTP LDAP
Added: 7.20.0
Category: tls
Category: tls imap pop3 smtp ldap
Multi: boolean
See-also:
- ssl

View file

@ -5,7 +5,7 @@ Long: ssl
Help: Try enabling TLS
Protocols: FTP IMAP POP3 SMTP LDAP
Added: 7.20.0
Category: tls
Category: tls imap pop3 smtp ldap
Multi: boolean
See-also:
- ssl-reqd

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: stderr
Arg: <file>
Help: Where to redirect stderr
Category: verbose
Category: verbose global
Added: 6.2
Multi: single
Scope: global

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: styled-output
Help: Enable styled output for HTTP headers
Added: 7.61.0
Category: verbose
Category: verbose global
Multi: boolean
Scope: global
See-also:

View file

@ -5,7 +5,7 @@ Long: trace-ascii
Arg: <file>
Help: Like --trace, but without hex output
Mutexed: trace verbose
Category: verbose
Category: verbose global
Added: 7.9.7
Multi: single
Scope: global

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: trace-config
Arg: <string>
Help: Details to log in trace/verbose output
Category: verbose
Category: verbose global
Added: 8.3.0
Multi: append
Scope: global

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: trace-ids
Help: Transfer + connection ids in verbose output
Added: 8.2.0
Category: verbose
Category: verbose global
Multi: boolean
Scope: global
See-also:

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: curl
Long: trace-time
Help: Add time stamps to trace/verbose output
Added: 7.14.0
Category: verbose
Category: verbose global
Multi: boolean
Scope: global
See-also:

View file

@ -5,7 +5,7 @@ Long: trace
Arg: <file>
Help: Write a debug trace to FILE
Mutexed: verbose trace-ascii
Category: verbose
Category: verbose global
Added: 7.9.7
Multi: single
Scope: global

View file

@ -5,7 +5,7 @@ Short: B
Long: use-ascii
Help: Use ASCII/text transfer
Protocols: FTP LDAP
Category: misc
Category: ftp output ldap
Added: 5.0
Multi: boolean
See-also:

View file

@ -5,7 +5,7 @@ Short: v
Long: verbose
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

@ -3,7 +3,7 @@ c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
Long: xattr
Help: Store metadata in extended file attributes
Category: misc
Category: output
Added: 7.21.3
Multi: boolean
See-also: