]> git.proxmox.com Git - rustc.git/blame - vendor/clap/examples/multicall-busybox.md
New upstream version 1.68.2+dfsg1
[rustc.git] / vendor / clap / examples / multicall-busybox.md
CommitLineData
6522a427
EL
1See the documentation for [`Command::multicall`][crate::Command::multicall] for rationale.
2
3This example omits every command except true and false,
4which are the most trivial to implement,
5```console
6$ busybox true
7? 0
8
9$ busybox false
10? 1
11
12```
13*Note: without the links setup, we can't demonstrate the multicall behavior*
14
15But includes the `--install` option as an example of why it can be useful
16for the main program to take arguments that aren't applet subcommands.
17```console
18$ busybox --install
19? failed
20...
21
22```
23
24Though users must pass something:
25```console
26$ busybox
27? failed
28Usage: busybox [OPTIONS] [APPLET]
29
30APPLETS:
31 true does nothing successfully
32 false does nothing unsuccessfully
33 help Print this message or the help of the given subcommand(s)
34
35Options:
36 --install <install> Install hardlinks for all subcommands in path
37 -h, --help Print help
38
39```