]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmdline-opts: category cleanup 14101/head
authorDaniel Stenberg <daniel@haxx.se>
Thu, 4 Jul 2024 11:38:18 +0000 (13:38 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 5 Jul 2024 09:05:50 +0000 (11:05 +0200)
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

64 files changed:
docs/cmdline-opts/Makefile.am
docs/cmdline-opts/connect-timeout.md
docs/cmdline-opts/connect-to.md
docs/cmdline-opts/create-dirs.md
docs/cmdline-opts/ech.md
docs/cmdline-opts/egd-file.md
docs/cmdline-opts/expect100-timeout.md
docs/cmdline-opts/fail-early.md
docs/cmdline-opts/form-escape.md
docs/cmdline-opts/form-string.md
docs/cmdline-opts/form.md
docs/cmdline-opts/ftp-create-dirs.md
docs/cmdline-opts/get.md
docs/cmdline-opts/happy-eyeballs-timeout-ms.md
docs/cmdline-opts/ipfs-gateway.md
docs/cmdline-opts/keepalive-time.md
docs/cmdline-opts/libcurl.md
docs/cmdline-opts/login-options.md
docs/cmdline-opts/max-time.md
docs/cmdline-opts/metalink.md
docs/cmdline-opts/netrc-file.md
docs/cmdline-opts/netrc-optional.md
docs/cmdline-opts/netrc.md
docs/cmdline-opts/no-buffer.md
docs/cmdline-opts/no-clobber.md
docs/cmdline-opts/ntlm-wb.md
docs/cmdline-opts/oauth2-bearer.md
docs/cmdline-opts/output-dir.md
docs/cmdline-opts/output.md
docs/cmdline-opts/parallel-immediate.md
docs/cmdline-opts/parallel-max.md
docs/cmdline-opts/parallel.md
docs/cmdline-opts/progress-bar.md
docs/cmdline-opts/random-file.md
docs/cmdline-opts/rate.md
docs/cmdline-opts/remove-on-error.md
docs/cmdline-opts/request.md
docs/cmdline-opts/retry-delay.md
docs/cmdline-opts/retry-max-time.md
docs/cmdline-opts/service-name.md
docs/cmdline-opts/show-error.md
docs/cmdline-opts/socks5.md
docs/cmdline-opts/speed-time.md
docs/cmdline-opts/ssl-reqd.md
docs/cmdline-opts/ssl.md
docs/cmdline-opts/stderr.md
docs/cmdline-opts/styled-output.md
docs/cmdline-opts/trace-ascii.md
docs/cmdline-opts/trace-config.md
docs/cmdline-opts/trace-ids.md
docs/cmdline-opts/trace-time.md
docs/cmdline-opts/trace.md
docs/cmdline-opts/use-ascii.md
docs/cmdline-opts/verbose.md
docs/cmdline-opts/xattr.md
scripts/managen
src/tool_help.c
src/tool_help.h
src/tool_listhelp.c
tests/data/test1462
tests/data/test1463
tests/data/test1464
tests/data/test1705
tests/data/test1706

index 7d62c4f456a1cf8ed20c9983affb99b0d717d011..0aa8a44fa27bbdadbc9abd72648df69abbc45f48 100644 (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)
index e1400811e9d98215ea41cd76f41e76c30147f5bb..dc5f9270409840eb889a11512d2f2801c35caea6 100644 (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:
index 2a1ec5643685a9ce9c755227c0d69f19e143d5f1..5782561656e15de8015db64f98bd001691b66584 100644 (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
index f1144946520ec6f29e4033201a34f1880ccf7372..c509efb0f8a2ab1c21259eb026d3a21fccde9a40 100644 (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:
index e1f605da2ed5e97b683fab45a37138694de13e83..6c2ba31cb69d83c17076104030d84263522b94aa 100644 (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:
index b68b7d496708369b8c4ca37e8759caacc3762fd0..ef16b99648173167ab869f02f7a32316c78d1c49 100644 (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:
index ce69227ad9ce1b36b62956d520f8d8565c51ab81..854761818a14edafefbb30a2afc74588201b4e8f 100644 (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
index bb22e14707fccc5338f55ad260ec4af25353054b..67edbf919ec56cf0c588dabddd716b26a6360911 100644 (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:
index 083c29e16ba11e91e218e1f9df0a09d5cd22340b..0f93fde7eb26e3188bc5595d1e8aacfc8493e51a 100644 (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
index 3c1f7b532754aa63bdf98d628284a229d936e92a..e58ad625d9f0f297346e2398c2d2f1467c91a918 100644 (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:
index 8a4c91e5ae1a91979fdcd5e91236bcd8086a1fcf..5daa571e641d8688fb2ea501be07784c48f31ceb 100644 (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:
index 5151e336c858786567b85a6c0f16122a5a3b7780..3e851ccae983084e54fe5b9fc81ee4aeed85a951 100644 (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:
index 395cb884fcb059b31f7559167afc84e4c9e3d35f..ac0560ab696dd0e0a21f3650cb4a659e1743568e 100644 (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:
index 8370ee92bbe36c13b5db0859c3a50bd1d363b3fe..f4b492db0de0890c7c70aca8884255ed27b34009 100644 (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
index 63429d83d127044ae3ca2fe2012dd3029ae404df..70ca717a7612575a9bd6afc44da2adc539ad8ac3 100644 (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
index 5fd7ab4b8c1a8e54cf3cda338f42c0908a7cf3bd..4b10ff6f451277561501980468013243ec29fb61 100644 (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
index eeae596d0a5d28eab0544f4408b739a56a921dd4..60af6054066bab57a13a22fc4d0e821e00a71350 100644 (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:
index fdeeda52a3a5d1ea2d2dd36a2a30ce6b55a78081..fc8292a2b957840f6c14b4d4634383016a89d3bd 100644 (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
index 9102442aa9d145453a9ce6fae8d7fd4a32b5a5d3..1d19e49729a42ce531684de17a3286660ab66cf5 100644 (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:
index 0c39b46edaccf6a8637db3d9ad18d7f91c13fc93..d3d3e2574655f8c477147b1ce1acd4af7110515a 100644 (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
index 841f23c48d9eb0f2d193b51781af635c7ef9995b..3df72ce145e7c69390f67bfddd79edd05267f5b0 100644 (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
index 6aa76954ae49fb9cf362481696915913c48ab118..9b9c068c88f66a0bd88077138266e83fb3d02f08 100644 (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:
index 4c07f9b75eece9e81dab6a4a89ab9c76780ed0f4..26e1ccd21a9f05854dc76aacb7d57ca51eafa564 100644 (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
index 41328b165ed50b41a55c69856a1c09018eda70b8..e0860155c888b51b585c71229a1bcde83fe6694d 100644 (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:
index 58646224c9fdc5e1bb492080920eda5ae9c4d26d..6909005638caf5fe376f1287cb4ba2a958f1aace 100644 (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:
index 4cc52b65e9a336ab369a8a06cd9d7dd908d501ef..3a1d35cb16ad6ec2d6ff6820cfbfaefe62976ecb 100644 (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:
index ee9ec5dccf1b77fc68e4adda75ae76180462ba17..b66477fc70c3d1e3a611bb3ccc57a5faa9c2b663 100644 (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:
index 8d779df0c726a0c731a752196a94678e511b5d9b..468ecc8a11768fe2005f0338fabb76cf84a7fdc5 100644 (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
index 3ab7e7e5a8cba747cff0835f7eb10051c87f260c..48360a49890cfdf0229851b54815b41d61f1510c 100644 (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:
index cf8e20928b2a92694f57443bf0c3db9009b43552..4d7a3ad51617d510e235e0a986c51519eb554b77 100644 (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:
index aa5142930d15d4fb570a16913267cc956532d60c..6b3684b8f2fa40b4b2806f761b98d3a846ddda5c 100644 (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:
index 9d59a4890ace991ed6e99be33cadc6b218696df3..fb9221bc6f2039d95aabdaac3fafb27a30d1b2a8 100644 (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:
index 7b9c599b9859d898ba7df0f5103cb73e92bdd9cf..6f08d7f7c7e9be325d7fc2512e748a9912039cfe 100644 (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
index 0f564d9d7e5533cc14a7408ce4cf6cb75a603eca..e2c8624abffaa0d14ece557a8592115651a9fbe1 100644 (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:
index fb2901e7e59d22c25ed1711b874c861ea32d7ded..49d0010b8ffe6da81ce143111e8f64c798d45812 100644 (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
index 54e8be874a5568e6ef5fa5bff255923085e442c7..4f9cf90de1bf1d888849dd5fe964757e8733fcde 100644 (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:
index 73ef63b2bf470ad22f64e6f2dc567d7c36cb9b91..86cf10deafa4cc47a7fb5b8fda1e37a210b2aea5 100644 (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:
index b2a405b63fdda5d195ba4635acbe165730ebe523..fcee1767a465cf936e1afc6bdc217282583027c6 100644 (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
index f7346475b9828601e172046a2d369739b90abaca..e95a381a450302a4f77749efbd53abb146ec7580 100644 (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
index b39bad4f18f956f14df58caff7f5a3ce06894e12..f98409aa25288098d1f9dc3108e77b5556fa9593 100644 (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
index 0517c37bb4106b2bffaeacf61b2d0e38502afd19..aaf865bc0ef368833117ec98eae48024905720ad 100644 (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
index f17dfeb71fac06843ee231e61e4cb1f9071cbc21..192adef4a76180c2b88ab503f0cb6fc89f97a031 100644 (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.
index ef8759ee54bf4e1475d4c7eb5bb335c5767c56ee..f27702bec3e87603f8d1fdf1b49ff7a04be0d8a4 100644 (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:
index 63f77807aa10074f49152a46f6f416247fce884d..f21c145f599357c6c08dddbd355afb0e488cb4c6 100644 (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
index c83332f22fb13a0d1f8e696b173af675de8ec007..0c0f28172acb72c69d4723900884b48e6c4c28f5 100644 (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
index bb42497de3302fed7ea94a0647d2b643085986c3..7030e557b09c971b284369a8e1bf1024c3411c05 100644 (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
index bb324532bdaba93ead103f570607014bc0923c35..8193896c5df2169ed4717ba014534e33b8e55648 100644 (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:
index 9311a80f1852d013acc4b6837216dd7aac4bbd42..f46f0a6f35827421dfbcfb6a32e821dc12a9d396 100644 (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
index d7c7e0daa426030cbcb896645f8a4a0211baed38..2f095401d29ed057474bf97ada4f94540e3c025a 100644 (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
index bf54ecb3427bbf7b1273b5970bd572c26539fa6f..dc7d61e7f7e41a72268fc2af35ecb1e65227029b 100644 (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:
index 79206ba9e0be0d57e102d6753bf7ea3ad74f7507..d3e0f47c19dec5f0f7f35229ae832e9b17dc9090 100644 (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:
index 649990ea66f75335b08028e4fef1e0e09cfbbbc1..875e756fd19419cbd34f6c0411a669b98b35df22 100644 (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
index 3586aa212a61d343831eb0104761596a61f4a3a7..c452ffbb1c46fc1a119f04dc42a451730fbc91a4 100644 (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:
index 53096c5462f83241db20739bf53f0b6fe2500938..9c42981ad45438d9694c484b9a7ac76a0741e498 100644 (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
index bfa74cf5aaa8af43b8a27626cc6168f2b170a542..9dd7dc585f34929b67a2be8494dab8f103abe99e 100644 (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:
index fc30c4f91ff9d4bd4a50bb52c190146ad7d17a18..e57053532fc310ed185419c806a14fa0acef582f 100755 (executable)
@@ -667,6 +667,10 @@ sub single {
     my $pre = $manpage ? "\n": "[1]";
 
     if($scope) {
+        if($category !~ /global/) {
+            print STDERR "$f:$line:1:ERROR: global scope option does not have global category\n";
+            return 2;
+        }
         if($scope eq "global") {
             push @desc, "\n" if(!$manpage);
             push @desc, "${pre}This option is global and does not need to be specified for each use of --next.\n";
@@ -885,7 +889,25 @@ sub header {
     printdesc($manpage, 0, @d);
 }
 
+
+sub sourcecategories {
+    my ($dir) = @_;
+    my %cats;
+    open(H, "<$dir/../../src/tool_help.h") ||
+        die "can't find the header file";
+    while(<H>) {
+        if(/^\#define CURLHELP_([A-Z0-9]*)/) {
+            $cats{lc($1)}++;
+        }
+    }
+    close(H);
+    return %cats;
+}
+
 sub listhelp {
+    my ($dir) = @_;
+    my %cats = sourcecategories($dir);
+
     print <<HEAD
 /***************************************************************************
  *                                  _   _ ____  _
@@ -938,6 +960,12 @@ HEAD
             $opt = "    --$long";
         }
         for my $i (0 .. $#categories) {
+            if(!$cats{ $categories[$i] }) {
+                printf STDERR "$f.md:ERROR: Unknown category '%s'\n",
+                    $categories[$i];
+                exit 3;
+            }
+
             $bitmask .= 'CURLHELP_' . uc $categories[$i];
             # If not last element, append |
             if($i < $#categories) {
@@ -963,7 +991,7 @@ HEAD
         print $line;
     }
     print <<FOOT
-  { NULL, NULL, CURLHELP_HIDDEN }
+  { NULL, NULL, 0 }
 };
 FOOT
         ;
@@ -982,9 +1010,9 @@ sub listcats {
         push @categories, $key;
     }
     @categories = sort @categories;
-    unshift @categories, 'hidden';
     for my $i (0..$#categories) {
-        print '#define ' . 'CURLHELP_' . uc($categories[$i]) . ' ' . "1u << " . $i . "u\n";
+        printf("#define CURLHELP_%-10s (%s)\n",
+               uc($categories[$i]), "1u << ${i}u");
     }
 }
 
@@ -1129,7 +1157,7 @@ sub getargs {
         return;
     }
     elsif($f eq "listhelp") {
-        listhelp();
+        listhelp($dir);
         return;
     }
     elsif($f eq "single") {
index 3d819774348ab24e2bef59d31deb6cd67ef29cab..bd231eb14ba817793e50166bbc1f6e28190c332e 100644 (file)
 struct category_descriptors {
   const char *opt;
   const char *desc;
-  curlhelp_t category;
+  unsigned int category;
 };
 
 static const struct category_descriptors categories[] = {
-  {"auth", "Different types of authentication methods", CURLHELP_AUTH},
-  {"connection", "Low level networking operations",
-   CURLHELP_CONNECTION},
-  {"curl", "The command line tool itself", CURLHELP_CURL},
-  {"dns", "General DNS options", CURLHELP_DNS},
-  {"file", "FILE protocol options", CURLHELP_FILE},
-  {"ftp", "FTP protocol options", CURLHELP_FTP},
-  {"http", "HTTP and HTTPS protocol options", CURLHELP_HTTP},
-  {"imap", "IMAP protocol options", CURLHELP_IMAP},
   /* important is left out because it is the default help page */
-  {"misc", "Options that do not fit into any other category", CURLHELP_MISC},
+  {"auth", "Authentication methods", CURLHELP_AUTH},
+  {"connection", "Manage connections", CURLHELP_CONNECTION},
+  {"curl", "The command line tool itself", CURLHELP_CURL},
+  {"deprecated", "Legacy", CURLHELP_DEPRECATED},
+  {"dns", "Names and resolving", CURLHELP_DNS},
+  {"file", "FILE protocol", CURLHELP_FILE},
+  {"ftp", "FTP protocol", CURLHELP_FTP},
+  {"global", "Global options", CURLHELP_GLOBAL},
+  {"http", "HTTP and HTTPS protocol", CURLHELP_HTTP},
+  {"imap", "IMAP protocol", CURLHELP_IMAP},
+  {"ldap", "LDAP protocol", CURLHELP_LDAP},
   {"output", "Filesystem output", CURLHELP_OUTPUT},
-  {"pop3", "POP3 protocol options", CURLHELP_POP3},
-  {"post", "HTTP Post specific options", CURLHELP_POST},
-  {"proxy", "All options related to proxies", CURLHELP_PROXY},
-  {"scp", "SCP protocol options", CURLHELP_SCP},
-  {"sftp", "SFTP protocol options", CURLHELP_SFTP},
-  {"smtp", "SMTP protocol options", CURLHELP_SMTP},
-  {"ssh", "SSH protocol options", CURLHELP_SSH},
-  {"telnet", "TELNET protocol options", CURLHELP_TELNET},
-  {"tftp", "TFTP protocol options", CURLHELP_TFTP},
-  {"tls", "All TLS/SSL related options", CURLHELP_TLS},
-  {"ech", "All Encrypted Client Hello (ECH) options", CURLHELP_ECH},
-  {"upload", "All options for uploads",
-   CURLHELP_UPLOAD},
-  {"verbose", "Options related to any kind of command line output of curl",
-   CURLHELP_VERBOSE},
-  {NULL, NULL, CURLHELP_HIDDEN}
+  {"pop3", "POP3 protocol", CURLHELP_POP3},
+  {"post", "HTTP POST specific", CURLHELP_POST},
+  {"proxy", "Options for proxies", CURLHELP_PROXY},
+  {"scp", "SCP protocol", CURLHELP_SCP},
+  {"sftp", "SFTP protocol", CURLHELP_SFTP},
+  {"smtp", "SMTP protocol", CURLHELP_SMTP},
+  {"ssh", "SSH protocol", CURLHELP_SSH},
+  {"telnet", "TELNET protocol", CURLHELP_TELNET},
+  {"tftp", "TFTP protocol", CURLHELP_TFTP},
+  {"timeout", "Timeouts and delays", CURLHELP_TIMEOUT},
+  {"tls", "TLS/SSL related", CURLHELP_TLS},
+  {"upload", "Upload, sending data", CURLHELP_UPLOAD},
+  {"verbose", "Tracing, logging etc", CURLHELP_VERBOSE}
 };
 
-static void print_category(curlhelp_t category, unsigned int cols)
+static void print_category(unsigned int category, unsigned int cols)
 {
   unsigned int i;
   size_t longopt = 5;
@@ -114,7 +112,7 @@ static void print_category(curlhelp_t category, unsigned int cols)
 static int get_category_content(const char *category, unsigned int cols)
 {
   unsigned int i;
-  for(i = 0; categories[i].opt; ++i)
+  for(i = 0; i < sizeof(categories)/sizeof(categories[0]); ++i)
     if(curl_strequal(categories[i].opt, category)) {
       printf("%s: %s\n", categories[i].opt, categories[i].desc);
       print_category(categories[i].category, cols);
@@ -127,7 +125,7 @@ static int get_category_content(const char *category, unsigned int cols)
 static void get_categories(void)
 {
   unsigned int i;
-  for(i = 0; categories[i].opt; ++i)
+  for(i = 0; i < sizeof(categories)/sizeof(categories[0]); ++i)
     printf(" %-11s %s\n", categories[i].opt, categories[i].desc);
 }
 
@@ -147,14 +145,14 @@ void tool_help(char *category)
   }
   /* Lets print everything if "all" was provided */
   else if(curl_strequal(category, "all"))
-    /* Print everything except hidden */
-    print_category(~(CURLHELP_HIDDEN), cols);
+    /* Print everything */
+    print_category(CURLHELP_ALL, cols);
   /* Lets handle the string "category" differently to not print an errormsg */
   else if(curl_strequal(category, "category"))
     get_categories();
   /* Otherwise print category and handle the case if the cat was not found */
   else if(get_category_content(category, cols)) {
-    puts("Invalid category provided, here is a list of all categories:\n");
+    puts("Unknown category provided, here is a list of all categories:\n");
     get_categories();
   }
   free(category);
index 894e39f85244112fca3d87129833fe69c2dbc56d..299da1db8cea296d7932c9d0b228aeae4473cdd6 100644 (file)
@@ -29,12 +29,10 @@ void tool_help(char *category);
 void tool_list_engines(void);
 void tool_version_info(void);
 
-typedef unsigned int curlhelp_t;
-
 struct helptxt {
   const char *opt;
   const char *desc;
-  curlhelp_t categories;
+  unsigned int categories;
 };
 
 /*
@@ -43,32 +41,34 @@ struct helptxt {
   make -C docs/cmdline-opts listcats
  */
 
-#define CURLHELP_HIDDEN 1u << 0u
-#define CURLHELP_AUTH 1u << 1u
-#define CURLHELP_CONNECTION 1u << 2u
-#define CURLHELP_CURL 1u << 3u
-#define CURLHELP_DNS 1u << 4u
-#define CURLHELP_FILE 1u << 5u
-#define CURLHELP_FTP 1u << 6u
-#define CURLHELP_HTTP 1u << 7u
-#define CURLHELP_IMAP 1u << 8u
-#define CURLHELP_IMPORTANT 1u << 9u
-#define CURLHELP_IPFS 1u << 10u
-#define CURLHELP_MISC 1u << 11u
-#define CURLHELP_OUTPUT 1u << 12u
-#define CURLHELP_POP3 1u << 13u
-#define CURLHELP_POST 1u << 14u
-#define CURLHELP_PROXY 1u << 15u
-#define CURLHELP_SCP 1u << 16u
-#define CURLHELP_SFTP 1u << 17u
-#define CURLHELP_SMTP 1u << 18u
-#define CURLHELP_SSH 1u << 19u
-#define CURLHELP_TELNET 1u << 20u
-#define CURLHELP_TFTP 1u << 21u
-#define CURLHELP_TLS 1u << 22u
-#define CURLHELP_UPLOAD 1u << 23u
-#define CURLHELP_VERBOSE 1u << 24u
-#define CURLHELP_ECH 1u << 25u
+#define CURLHELP_AUTH       (1u << 0u)
+#define CURLHELP_CONNECTION (1u << 1u)
+#define CURLHELP_CURL       (1u << 2u)
+#define CURLHELP_DEPRECATED (1u << 3u)
+#define CURLHELP_DNS        (1u << 4u)
+#define CURLHELP_FILE       (1u << 5u)
+#define CURLHELP_FTP        (1u << 6u)
+#define CURLHELP_GLOBAL     (1u << 7u)
+#define CURLHELP_HTTP       (1u << 8u)
+#define CURLHELP_IMAP       (1u << 9u)
+#define CURLHELP_IMPORTANT  (1u << 10u)
+#define CURLHELP_LDAP       (1u << 11u)
+#define CURLHELP_OUTPUT     (1u << 12u)
+#define CURLHELP_POP3       (1u << 13u)
+#define CURLHELP_POST       (1u << 14u)
+#define CURLHELP_PROXY      (1u << 15u)
+#define CURLHELP_SCP        (1u << 16u)
+#define CURLHELP_SFTP       (1u << 17u)
+#define CURLHELP_SMTP       (1u << 18u)
+#define CURLHELP_SSH        (1u << 19u)
+#define CURLHELP_TELNET     (1u << 20u)
+#define CURLHELP_TFTP       (1u << 21u)
+#define CURLHELP_TIMEOUT    (1u << 22u)
+#define CURLHELP_TLS        (1u << 23u)
+#define CURLHELP_UPLOAD     (1u << 24u)
+#define CURLHELP_VERBOSE    (1u << 25u)
+
+#define CURLHELP_ALL        (0xfffffffu)
 
 extern const struct helptxt helptext[];
 
index fd25927a6263ac8e23e2012bedb297d111344729..46bbfd19698fdb3d5af30491d7257ec867e690d3 100644 (file)
@@ -83,10 +83,10 @@ const struct helptxt helptext[] = {
    CURLHELP_CURL},
   {"    --connect-timeout <seconds>",
    "Maximum time allowed to connect",
-   CURLHELP_CONNECTION},
+   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
   {"    --connect-to <HOST1:PORT1:HOST2:PORT2>",
-   "Connect to host",
-   CURLHELP_CONNECTION},
+   "Connect to host2 instead of host1",
+   CURLHELP_CONNECTION | CURLHELP_DNS},
   {"-C, --continue-at <offset>",
    "Resumed transfer offset",
    CURLHELP_CONNECTION},
@@ -98,7 +98,7 @@ const struct helptxt helptext[] = {
    CURLHELP_HTTP},
   {"    --create-dirs",
    "Create necessary local directory hierarchy",
-   CURLHELP_CURL | CURLHELP_OUTPUT},
+   CURLHELP_OUTPUT},
   {"    --create-file-mode <mode>",
    "File mode for created files",
    CURLHELP_SFTP | CURLHELP_SCP | CURLHELP_FILE | CURLHELP_UPLOAD},
@@ -170,10 +170,10 @@ const struct helptxt helptext[] = {
    CURLHELP_HTTP | CURLHELP_FTP},
   {"    --ech <config>",
    "Configure ECH",
-   CURLHELP_TLS | CURLHELP_ECH},
+   CURLHELP_TLS},
   {"    --egd-file <file>",
    "EGD socket path for random data",
-   CURLHELP_TLS},
+   CURLHELP_DEPRECATED},
   {"    --engine <name>",
    "Crypto engine to use",
    CURLHELP_TLS},
@@ -185,13 +185,13 @@ const struct helptxt helptext[] = {
    CURLHELP_HTTP},
   {"    --expect100-timeout <seconds>",
    "How long to wait for 100-continue",
-   CURLHELP_HTTP},
+   CURLHELP_HTTP | CURLHELP_TIMEOUT},
   {"-f, --fail",
    "Fail fast with no output on HTTP errors",
    CURLHELP_IMPORTANT | CURLHELP_HTTP},
   {"    --fail-early",
    "Fail on first transfer error",
-   CURLHELP_CURL},
+   CURLHELP_CURL | CURLHELP_GLOBAL},
   {"    --fail-with-body",
    "Fail on HTTP errors but save the body",
    CURLHELP_HTTP | CURLHELP_OUTPUT},
@@ -200,13 +200,15 @@ const struct helptxt helptext[] = {
    CURLHELP_TLS},
   {"-F, --form <name=content>",
    "Specify multipart MIME data",
-   CURLHELP_HTTP | CURLHELP_UPLOAD},
+   CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST | CURLHELP_IMAP |
+   CURLHELP_SMTP},
   {"    --form-escape",
    "Escape form fields using backslash",
-   CURLHELP_HTTP | CURLHELP_UPLOAD},
+   CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST},
   {"    --form-string <name=string>",
    "Specify multipart MIME data",
-   CURLHELP_HTTP | CURLHELP_UPLOAD},
+   CURLHELP_HTTP | CURLHELP_UPLOAD | CURLHELP_POST | CURLHELP_SMTP |
+   CURLHELP_IMAP},
   {"    --ftp-account <data>",
    "Account data string",
    CURLHELP_FTP | CURLHELP_AUTH},
@@ -215,7 +217,7 @@ const struct helptxt helptext[] = {
    CURLHELP_FTP},
   {"    --ftp-create-dirs",
    "Create the remote dirs if not present",
-   CURLHELP_FTP | CURLHELP_SFTP | CURLHELP_CURL},
+   CURLHELP_FTP | CURLHELP_SFTP},
   {"    --ftp-method <method>",
    "Control CWD usage",
    CURLHELP_FTP},
@@ -242,13 +244,13 @@ const struct helptxt helptext[] = {
    CURLHELP_FTP | CURLHELP_TLS},
   {"-G, --get",
    "Put the post data in the URL and use GET",
-   CURLHELP_HTTP | CURLHELP_UPLOAD},
+   CURLHELP_HTTP},
   {"-g, --globoff",
    "Disable URL globbing with {} and []",
    CURLHELP_CURL},
   {"    --happy-eyeballs-timeout-ms <ms>",
    "Time for IPv6 before IPv4",
-   CURLHELP_CONNECTION},
+   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
   {"    --haproxy-clientip <ip>",
    "Set address in HAProxy PROXY",
    CURLHELP_HTTP | CURLHELP_PROXY},
@@ -311,7 +313,7 @@ const struct helptxt helptext[] = {
    CURLHELP_CONNECTION},
   {"    --ipfs-gateway <URL>",
    "Gateway for IPFS",
-   CURLHELP_IPFS},
+   CURLHELP_CURL},
   {"-4, --ipv4",
    "Resolve names to IPv4 addresses",
    CURLHELP_CONNECTION | CURLHELP_DNS},
@@ -329,7 +331,7 @@ const struct helptxt helptext[] = {
    CURLHELP_CONNECTION},
   {"    --keepalive-time <seconds>",
    "Interval time for keepalive probes",
-   CURLHELP_CONNECTION},
+   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
   {"    --key <key>",
    "Private key filename",
    CURLHELP_TLS | CURLHELP_SSH},
@@ -341,7 +343,7 @@ const struct helptxt helptext[] = {
    CURLHELP_FTP},
   {"    --libcurl <file>",
    "Generate libcurl code for this command line",
-   CURLHELP_CURL},
+   CURLHELP_CURL | CURLHELP_GLOBAL},
   {"    --limit-rate <speed>",
    "Limit transfer speed to RATE",
    CURLHELP_CONNECTION},
@@ -359,7 +361,8 @@ const struct helptxt helptext[] = {
    CURLHELP_HTTP | CURLHELP_AUTH},
   {"    --login-options <options>",
    "Server login options",
-   CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP | CURLHELP_AUTH},
+   CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP | CURLHELP_AUTH |
+   CURLHELP_LDAP},
   {"    --mail-auth <address>",
    "Originator address of the original email",
    CURLHELP_SMTP},
@@ -383,10 +386,10 @@ const struct helptxt helptext[] = {
    CURLHELP_HTTP},
   {"-m, --max-time <seconds>",
    "Maximum time allowed for transfer",
-   CURLHELP_CONNECTION},
+   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
   {"    --metalink",
    "Process given URLs as metalink XML file",
-   CURLHELP_MISC},
+   CURLHELP_DEPRECATED},
   {"    --mptcp",
    "Enable Multipath TCP",
    CURLHELP_CONNECTION},
@@ -395,13 +398,13 @@ const struct helptxt helptext[] = {
    CURLHELP_AUTH | CURLHELP_HTTP},
   {"-n, --netrc",
    "Must read .netrc for username and password",
-   CURLHELP_CURL},
+   CURLHELP_AUTH},
   {"    --netrc-file <filename>",
    "Specify FILE for netrc",
-   CURLHELP_CURL},
+   CURLHELP_AUTH},
   {"    --netrc-optional",
    "Use either .netrc or URL",
-   CURLHELP_CURL},
+   CURLHELP_AUTH},
   {"-:, --next",
    "Make next URL use separate options",
    CURLHELP_CURL},
@@ -410,10 +413,10 @@ const struct helptxt helptext[] = {
    CURLHELP_TLS | CURLHELP_HTTP},
   {"-N, --no-buffer",
    "Disable buffering of the output stream",
-   CURLHELP_CURL},
+   CURLHELP_OUTPUT},
   {"    --no-clobber",
    "Do not overwrite files that already exist",
-   CURLHELP_CURL | CURLHELP_OUTPUT},
+   CURLHELP_OUTPUT},
   {"    --no-keepalive",
    "Disable TCP keepalive on the connection",
    CURLHELP_CONNECTION},
@@ -434,25 +437,26 @@ const struct helptxt helptext[] = {
    CURLHELP_AUTH | CURLHELP_HTTP},
   {"    --ntlm-wb",
    "HTTP NTLM authentication with winbind",
-   CURLHELP_AUTH | CURLHELP_HTTP},
+   CURLHELP_DEPRECATED},
   {"    --oauth2-bearer <token>",
    "OAuth 2 Bearer Token",
-   CURLHELP_AUTH},
+   CURLHELP_AUTH | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
+   CURLHELP_LDAP},
   {"-o, --output <file>",
    "Write to file instead of stdout",
-   CURLHELP_IMPORTANT | CURLHELP_CURL | CURLHELP_OUTPUT},
+   CURLHELP_IMPORTANT | CURLHELP_OUTPUT},
   {"    --output-dir <dir>",
    "Directory to save files in",
-   CURLHELP_CURL | CURLHELP_OUTPUT},
+   CURLHELP_OUTPUT},
   {"-Z, --parallel",
    "Perform transfers in parallel",
-   CURLHELP_CONNECTION | CURLHELP_CURL},
+   CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL},
   {"    --parallel-immediate",
    "Do not wait for multiplexing",
-   CURLHELP_CONNECTION | CURLHELP_CURL},
+   CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL},
   {"    --parallel-max <num>",
    "Maximum concurrency for parallel transfers",
-   CURLHELP_CONNECTION | CURLHELP_CURL},
+   CURLHELP_CONNECTION | CURLHELP_CURL | CURLHELP_GLOBAL},
   {"    --pass <phrase>",
    "Passphrase for the private key",
    CURLHELP_SSH | CURLHELP_TLS | CURLHELP_AUTH},
@@ -476,7 +480,7 @@ const struct helptxt helptext[] = {
    CURLHELP_PROXY},
   {"-#, --progress-bar",
    "Display transfer progress as a bar",
-   CURLHELP_VERBOSE},
+   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"    --proto <protocols>",
    "Enable/disable PROTOCOLS",
    CURLHELP_CONNECTION | CURLHELP_CURL},
@@ -587,13 +591,13 @@ const struct helptxt helptext[] = {
    CURLHELP_FTP | CURLHELP_SFTP},
   {"    --random-file <file>",
    "File for reading random data from",
-   CURLHELP_MISC},
+   CURLHELP_DEPRECATED},
   {"-r, --range <range>",
    "Retrieve only the bytes within RANGE",
    CURLHELP_HTTP | CURLHELP_FTP | CURLHELP_SFTP | CURLHELP_FILE},
   {"    --rate <max request rate>",
    "Request rate for serial transfers",
-   CURLHELP_CONNECTION},
+   CURLHELP_CONNECTION | CURLHELP_GLOBAL},
   {"    --raw",
    "Do HTTP raw; no transfer decoding",
    CURLHELP_HTTP},
@@ -614,10 +618,11 @@ const struct helptxt helptext[] = {
    CURLHELP_OUTPUT},
   {"    --remove-on-error",
    "Remove output file on errors",
-   CURLHELP_CURL | CURLHELP_OUTPUT},
+   CURLHELP_OUTPUT},
   {"-X, --request <method>",
    "Specify request method to use",
-   CURLHELP_CONNECTION},
+   CURLHELP_CONNECTION | CURLHELP_POP3 | CURLHELP_FTP | CURLHELP_IMAP |
+   CURLHELP_SMTP},
   {"    --request-target <path>",
    "Specify the target for this request",
    CURLHELP_HTTP},
@@ -635,10 +640,10 @@ const struct helptxt helptext[] = {
    CURLHELP_CURL},
   {"    --retry-delay <seconds>",
    "Wait time between retries",
-   CURLHELP_CURL},
+   CURLHELP_CURL | CURLHELP_TIMEOUT},
   {"    --retry-max-time <seconds>",
    "Retry only within this period",
-   CURLHELP_CURL},
+   CURLHELP_CURL | CURLHELP_TIMEOUT},
   {"    --sasl-authzid <identity>",
    "Identity for SASL PLAIN authentication",
    CURLHELP_AUTH},
@@ -647,10 +652,10 @@ const struct helptxt helptext[] = {
    CURLHELP_AUTH},
   {"    --service-name <name>",
    "SPNEGO service name",
-   CURLHELP_MISC},
+   CURLHELP_AUTH},
   {"-S, --show-error",
    "Show error even when -s is used",
-   CURLHELP_CURL},
+   CURLHELP_CURL | CURLHELP_GLOBAL},
   {"-s, --silent",
    "Silent mode",
    CURLHELP_IMPORTANT | CURLHELP_VERBOSE},
@@ -683,10 +688,11 @@ const struct helptxt helptext[] = {
    CURLHELP_CONNECTION},
   {"-y, --speed-time <seconds>",
    "Trigger 'speed-limit' abort after this time",
-   CURLHELP_CONNECTION},
+   CURLHELP_CONNECTION | CURLHELP_TIMEOUT},
   {"    --ssl",
    "Try enabling TLS",
-   CURLHELP_TLS},
+   CURLHELP_TLS | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
+   CURLHELP_LDAP},
   {"    --ssl-allow-beast",
    "Allow security flaw to improve interop",
    CURLHELP_TLS},
@@ -698,7 +704,8 @@ const struct helptxt helptext[] = {
    CURLHELP_TLS},
   {"    --ssl-reqd",
    "Require SSL/TLS",
-   CURLHELP_TLS},
+   CURLHELP_TLS | CURLHELP_IMAP | CURLHELP_POP3 | CURLHELP_SMTP |
+   CURLHELP_LDAP},
   {"    --ssl-revoke-best-effort",
    "Ignore missing cert CRL dist points",
    CURLHELP_TLS},
@@ -710,10 +717,10 @@ const struct helptxt helptext[] = {
    CURLHELP_TLS},
   {"    --stderr <file>",
    "Where to redirect stderr",
-   CURLHELP_VERBOSE},
+   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"    --styled-output",
    "Enable styled output for HTTP headers",
-   CURLHELP_VERBOSE},
+   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"    --suppress-connect-headers",
    "Suppress proxy CONNECT response headers",
    CURLHELP_PROXY},
@@ -770,19 +777,19 @@ const struct helptxt helptext[] = {
    CURLHELP_HTTP},
   {"    --trace <file>",
    "Write a debug trace to FILE",
-   CURLHELP_VERBOSE},
+   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"    --trace-ascii <file>",
    "Like --trace, but without hex output",
-   CURLHELP_VERBOSE},
+   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"    --trace-config <string>",
    "Details to log in trace/verbose output",
-   CURLHELP_VERBOSE},
+   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"    --trace-ids",
    "Transfer + connection ids in verbose output",
-   CURLHELP_VERBOSE},
+   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"    --trace-time",
    "Add time stamps to trace/verbose output",
-   CURLHELP_VERBOSE},
+   CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"    --unix-socket <path>",
    "Connect through this Unix domain socket",
    CURLHELP_CONNECTION},
@@ -797,7 +804,7 @@ const struct helptxt helptext[] = {
    CURLHELP_HTTP | CURLHELP_POST | CURLHELP_UPLOAD},
   {"-B, --use-ascii",
    "Use ASCII/text transfer",
-   CURLHELP_MISC},
+   CURLHELP_FTP | CURLHELP_OUTPUT | CURLHELP_LDAP},
   {"-u, --user <user:password>",
    "Server user and password",
    CURLHELP_IMPORTANT | CURLHELP_AUTH},
@@ -809,7 +816,7 @@ const struct helptxt helptext[] = {
    CURLHELP_CURL},
   {"-v, --verbose",
    "Make the operation more talkative",
-   CURLHELP_IMPORTANT | CURLHELP_VERBOSE},
+   CURLHELP_IMPORTANT | CURLHELP_VERBOSE | CURLHELP_GLOBAL},
   {"-V, --version",
    "Show version number and quit",
    CURLHELP_IMPORTANT | CURLHELP_CURL},
@@ -821,6 +828,6 @@ const struct helptxt helptext[] = {
    CURLHELP_VERBOSE},
   {"    --xattr",
    "Store metadata in extended file attributes",
-   CURLHELP_MISC},
-  { NULL, NULL, CURLHELP_HIDDEN }
+   CURLHELP_OUTPUT},
+  { NULL, NULL, 0 }
 };
index 32b63c0615e65f633c97be8b6b96576c07892e2b..572b1dd4b83be4e7e9dfde3442f1d949504ed479 100644 (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>
index 68b3e4fb0d602452698ff6ab19f5d961a612990d..a916cb4dfa7172681411d73ffe267bdb7082d2dc 100644 (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
index 186c6ee02456cb0871d402ed4044a30f8594eaa9..ccdb56d1a376ddcc3d232f79c778abf5936cf172 100644 (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
index 2e73627a22ca9fc19db4e33ec5a394a7687a8845..df2b23d86fc89f9021acb4c90553568696002109 100644 (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
index f673832e622f744ce7c783dbb91d3b90c1841d74..7752ecf3132e387b96942a81f4727baa5e5da46c 100644 (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