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
1.1 KiB
c | SPDX-License-Identifier | Long | Arg | Short | Help | Category | Added | Multi | See-also | Example | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. | curl | help | <subject> | h | Get help for commands | important curl | 4.0 | custom |
|
|
--help
Usage help. Provide help for the subject given as an optional argument.
If no argument is provided, curl displays the most important command line arguments.
The argument can either be a category or a command line option. When a
category is provided, curl shows all command line options within the given
category. Specify category all
to list all available options.
If category
is specified, curl displays all available help categories.
If the provided subject is instead an existing command line option, specified either in its short form with a single dash and a single letter, or in the long form with two dashes and a longer name, curl displays a help text for that option in the terminal.
The help output is extensive for some options.
If the provided command line option is not known, curl says so.