]> git.ipfire.org Git - thirdparty/curl.git/commit
curl: --help [option] displays documentation for given cmdline option
authorDaniel Stenberg <daniel@haxx.se>
Sat, 3 Aug 2024 18:24:12 +0000 (20:24 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 4 Aug 2024 14:06:17 +0000 (16:06 +0200)
commit9a0cf56471c1a90706e9710ce46d23315e716c10
treed812982eade9dcdf9e2f37d2463622668904fae9
parent9b1e4b4632447d0b20e77bbae2f22bd8258854db
curl: --help [option] displays documentation for given cmdline option

Since the documentation text blob might be gzipped, it needs to search
for what to output in a streaming manner. It then first searches for
"\nALL OPTIONS".

Then, it looks for the start to display at "\n    -[option]" and stops
again at "\n    -". Except for the last option in the man page, which
ends at "\nFILES" - the subtitle for the section following all options
in the manpage.

Test 1707 to 1710 verify

Closes #13997
22 files changed:
docs/TODO
docs/cmdline-opts/_OPTIONS.md
docs/cmdline-opts/help.md
src/mkhelp.pl
src/tool_getparam.c
src/tool_getparam.h
src/tool_help.c
src/tool_help.h
src/tool_hugehelp.c.cvs
src/tool_hugehelp.h
src/tool_listhelp.c
tests/Makefile.am
tests/data/Makefile.am
tests/data/test1461
tests/data/test1462
tests/data/test1463
tests/data/test1464
tests/data/test1707 [new file with mode: 0644]
tests/data/test1708 [new file with mode: 0644]
tests/data/test1709 [new file with mode: 0644]
tests/data/test1710 [new file with mode: 0644]
tests/test1707.pl [new file with mode: 0755]