clap/examples/repl-derive.md
2024-01-23 17:35:15 -05:00

495 B

This requires enabling the [derive feature flag][crate::_features].

Help:

$ echo --help
Usage: echo --text <TEXT>

Options:
  -h, --help  Print help

Echo:
  -t, --text <TEXT>  The text to be echoed [aliases: text]
$ ping --help
Usage: ping

Options:
  -h, --help  Print help
$ exit --help
Usage: exit

Options:
  -h, --help  Print help

Echo:

$ echo -t 'Hello, world!'
Hello, world!

Ping:

$ ping
pong

Exit:

$ exit
Exiting ...