;doc: cli: help, common tasks: update

This commit is contained in:
Simon Michael 2022-08-22 07:32:20 +01:00
parent c966a0f413
commit 8eb1e0883a
2 changed files with 24 additions and 17 deletions

View File

@ -2,12 +2,8 @@ help\
Show the hledger user manual in one of several formats, Show the hledger user manual in one of several formats,
optionally positioned at a given TOPIC (if possible). optionally positioned at a given TOPIC (if possible).
TOPIC is any heading in the manual, TOPIC is any heading in the manual, or a heading prefix, case insensitive.
or the start of any heading (but not the middle). Eg: `commands`, `print`, `forecast`, `"auto postings"`, `journal`, `amount`.
It is case insensitive.
Some examples:
`commands`, `print`, `forecast`, `"auto postings"`, `"commodity column"`.
_FLAGS _FLAGS
@ -20,3 +16,10 @@ By default it uses the best viewer it can find in $PATH, in this order:
When run non-interactively, it always uses stdout. When run non-interactively, it always uses stdout.
Or you can select a particular viewer with the Or you can select a particular viewer with the
`-i` (info), `-m` (man), or `-p` (pager) flags. `-i` (info), `-m` (man), or `-p` (pager) flags.
Examples
```shell
$ hledger help --help # show how the help command works
$ hledger help # show the hledger manual with info, man or $PAGER
$ hledger help journal # show the journal topic in the hledger manual
```

View File

@ -5170,23 +5170,27 @@ file.
# COMMON TASKS # COMMON TASKS
Here are some quick examples of how to do some basic tasks with hledger. Here are some quick examples of how to do some basic tasks with hledger.
For more details, see the reference section below, the hledger_journal(5) manual,
or the more extensive docs at <https://hledger.org>.
## Getting help ## Getting help
Here's how to list commands and view options and command docs:
```shell ```shell
$ hledger # show available commands $ hledger # show available commands
$ hledger --help # show common options $ hledger --help # show common options
$ hledger CMD --help # show common and command options, and command help $ hledger CMD --help # show common options and CMD's options and documentation
$ hledger help # show available manuals/topics
$ hledger help hledger # show hledger manual, as info/man/text (auto-chosen)
$ hledger help journal -m # show the journal topic, as a man page scrolled to that section
$ hledger help --help # show more detailed help for the help command
``` ```
Find more docs, chat, mail list, reddit, issue tracker: You can also view your hledger version's manual in several formats
<https://hledger.org/support.html> by using the [help command](#help). Eg:
```shell
$ hledger help # show the hledger manual with info, man or $PAGER (best available)
$ hledger help journal # show the journal topic in the hledger manual
$ hledger help --help # show how the help command works
```
To view manuals and introductory docs on the web, visit <https://hledger.org>.
Chat and mail list support and discussion archives can be found at <https://hledger.org/support>.
## Constructing command lines ## Constructing command lines