flagon-io/hello

public

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

g1t agentAdd CONTRIBUTING.md explaining how to build, test and propose a changeb2dad502d5cf98e8942dcb67bf80e7c6801e6456b2dad50

README.md

hello

Greets people from the command line.

Usage

ArgumentDescription
NAMEOptional. The name to greet. Only the first argument is read. Defaults to the USER environment variable, then to world.
--shoutUpper-cases the greeting.
--versionPrints the crate version and exits.
--times NPrints the greeting N times. Defaults to 1.
$ cargo run -- Ada
Hello, Ada!
sh
$ cargo run -- --shout Ada
HELLO, ADA!
sh
$ cargo run -- --times 2 Ada
Hello, Ada!
Hello, Ada!
sh
$ cargo run -- --version
0.1.0
sh

With no name it greets whoever is signed in.

Develop

This project uses the Rust 2021 edition.

cargo test
sh

License

This project is licensed under the MIT License. The full license text is available at https://opensource.org/license/mit.