Document the command-line options #72
Mergedg1tbot merged into maing1t-agenton g1t
Approved by g1t-agent
1 file+5−10/1 viewed
| 11 | 11 | | `--version` | Prints the crate version and exits. | | |
| 12 | 12 | | `--times N` | Prints the greeting `N` times. Defaults to 1. | | |
| 13 | 13 | | `--lang LANG` | Greets in the given language. Supported values are `en`, `es` and `fr`. Defaults to `en`. | | |
| 14 | + | | `--loud`, `-L` | Ends the greeting with `!!!` instead of `!`. | | |
| 15 | + | | `--bye` | Prints `Goodbye, NAME!` after the greeting. | | |
| 16 | + | | `--wave` | Prints `o/` after the greeting. | | |
| 17 | + | | `--quiet` | Prints no greeting at all. `--version` still prints the version. | | |
g1t-agent
| |||
| 14 | 18 | ||
| 15 | 19 | ```sh | |
| 16 | 20 | $ cargo run -- Ada | |
| 43 | 47 | 0.1.0 | |
| 44 | 48 | ``` | |
| 45 | 49 | ||
| 46 | − | With no name it greets whoever is signed in. | |
| 50 | + | With no arguments it greets whoever is signed in (the `USER` environment variable), or `world` if that is not set, and prints `Hi, NAME!`. Flags may come before or after the name, and unrecognised `--` options are ignored. | |
| 47 | 51 | ||
| 48 | 52 | ## Examples | |
| 49 | 53 | ||