Skip to content

Commit 2dbd24f

Browse files
committed
Fix out-of-date documentation
1 parent bbf0b2c commit 2dbd24f

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

doc/dispatch.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,11 @@ the tool-level `help` command.
3535

3636
You may also specify groups; groups are containers of sub-commands, and may themselves contain sub-groups.
3737

38-
Groups serve two purposes:
39-
40-
* They divide the list of commands into sequences of related commands
41-
42-
* They may optionally define a command group name, which isolates the commands within the group; for example, the way the `docker` command has sub-commands such as `compose` and `volume`, each containing further sub-commands.
43-
44-
The group map is keyed on a command name, and its value defines the group; like the top-level map,
38+
The group map is keyed on a group name, and its value defines the group; like the top-level map,
4539
a group will contain keys for :namespaces, :title, :doc, and :groups (for more deeply nested groups).
4640

4741
The group's :title is used in the tool help summary.
48-
49-
Many of these options are optional; details in the [dispatch](dispatch.md) docs.
50-
42+
5143
![Top Level Help](images/top-level-help.png)
5244

5345
In the above example, `colors`, `completions`, `help`, `job-status-demo`, and `kill-port` are commands.
@@ -60,7 +52,8 @@ The :doc and :title group options may be omitted.
6052
If :doc is omitted, then `dispatch` will search the group's namespaces, and use the first namespace docstring
6153
it finds.
6254

63-
If :title is omitted, then the first line of the docstring, up to the first `.`, will be used as the title.
55+
If :title is omitted, then the first sentence of the :doc key, up to (but not including)
56+
the first `.`, will be used as the title.
6457

6558
## Callbacks
6659

@@ -76,4 +69,4 @@ to invoke.
7669

7770
The :pre-invoke callback is invoked once a specific command function is identified.
7871
The callback is invoked immediately before the command function is invoked; it is passed the
79-
command map, and a seq of remaining arguments (that will be passed to the command function).
72+
command map, and a seq of remaining arguments (that will then be passed to the command function).

0 commit comments

Comments
 (0)