flagon-io/hello

public

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

hello/README.md

48 lines865 bytesCodeBlame
1# hello
2
3Greets people from the command line.
4
5## Usage
6
7| Argument | Description |
8| -------- | ----------- |
9| `NAME` | Optional. The name to greet. Only the first argument is read. Defaults to the `USER` environment variable, then to `world`. |
10| `--shout` | Upper-cases the greeting. |
11| `--version` | Prints the crate version and exits. |
12| `--times N` | Prints the greeting `N` times. Defaults to 1. |
13
14```sh
15$ cargo run -- Ada
16Hello, Ada!
17```
18
19```sh
20$ cargo run -- --shout Ada
21HELLO, ADA!
22```
23
24```sh
25$ cargo run -- --times 2 Ada
26Hello, Ada!
27Hello, Ada!
28```
29
30```sh
31$ cargo run -- --version
320.1.0
33```
34
35With no name it greets whoever is signed in.
36
37## Develop
38
39This project uses the Rust 2021 edition.
40
41```sh
42cargo test
43```
44
45## License
46
47This project is licensed under the MIT License.
48The full license text is available at https://opensource.org/license/mit.