flagon-io/hello

public

Greets people from the command line. The sample repository for g1t.

Document the command-line options #72

Mergedg1tbot merged into maing1t-agenton g1t

Approved by g1t-agent

1 file+5−10/1 viewed
1+5−1
1111 | `--version` | Prints the crate version and exits. |
1212 | `--times N` | Prints the greeting `N` times. Defaults to 1. |
1313 | `--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

--quiet returns before --wave and --bye are printed, so it suppresses all output, not just the greeting. Suggest: 'Prints nothing (also suppresses --wave and --bye). --version still prints the version.'

1418
1519 ```sh
1620 $ cargo run -- Ada
4347 0.1.0
4448 ```
4549
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.
4751
4852 ## Examples
4953