Skip to content

Commit

Permalink
cmdline/help: document -h [option]
Browse files Browse the repository at this point in the history
And call the chapter 'help' instead of 'list options'

Fixes #504
Closes #522
  • Loading branch information
bagder committed Dec 19, 2024
1 parent 545be95 commit edff8e7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* [Long options](cmdline/options/long.md)
* [Arguments to options](cmdline/options/args.md)
* [Negative options](cmdline/options/negative.md)
* [Help](cmdline/help.md)
* [Options depend on version](cmdline/versions.md)
* [URLs](cmdline/urls/README.md)
* [Scheme](cmdline/urls/scheme.md)
Expand All @@ -72,7 +73,6 @@
* [Connection reuse](cmdline/urls/connreuse.md)
* [Parallel transfers](cmdline/urls/parallel.md)
* [trurl](cmdline/urls/trurl.md)
* [List options](cmdline/listopts.md)
* [Config file](cmdline/configfile.md)
* [Variables](cmdline/variables.md)
* [Passwords](cmdline/passwords.md)
Expand Down
2 changes: 1 addition & 1 deletion cmdline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ implementations in the most creative ways.

* [Differences](differences.md)
* [Command line options](options/)
* [Help](help.md)
* [Options depend on version](versions.md)
* [URLs](urls/)
* [List options](listopts.md)
* [Config file](configfile.md)
* [Variables](variables.md)
* [Passwords](passwords.md)
Expand Down
26 changes: 22 additions & 4 deletions cmdline/listopts.md → cmdline/help.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
# List options
# Help

curl has more than two hundred and fifty command-line options and the number
curl has more than two hundred and sixty command-line options and the number
of options keep increasing over time. Chances are the number of options
reaches or even surpasses three hundred in the coming years.

## List options

To find out which options you need to perform a certain action, you can get
curl to list them. First, `curl --help` or simply `curl -h` get you a list of
the most important and frequently used options. You can then provide an
additional "category" to `-h` to get more options listed for that specific
area. Use `curl -h category` to list all existing categories or `curl -h all`
to list *all* available options.

## Help with a specific option

To get curl to display the documentation about a single specific command line
option, add the option after `-h`. Use either the short name with a single
dash (`-`) or the long version using two dashes (`--`).

For example, learn what `-U` does by running

curl -h -U

Or get `--insecure` explained like this:

curl -h --insecure

## Full manual

The `curl --manual` option outputs the entire man page for curl. That is a
thorough and complete document on how each option works amassing several
thousand lines of documentation. To wade through that is also a tedious work
and we encourage use of a search function through those text masses. Some
people might also appreciate the man page in its
[web version](https://curl.se/docs/manpage.html).
people might also appreciate the man page in its [web
version](https://curl.se/docs/manpage.html).

0 comments on commit edff8e7

Please sign in to comment.