hello/README.md
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Greet people from the command line | 1 | # hello |
| 2 | ||
| 3 | Greets people from the command line. | |
| 4 | ||
| Add Usage section to README | 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`. | | |
| Document --shout, --version and --times in README usage | 10 | | `--shout` | Upper-cases the greeting. | |
| Add --whisper flag | 11 | | `--whisper` | Lower-cases the greeting and ends it with `...` instead of `!`. With `--shout`, the last one given wins. | |
| Add --reverse flag | 12 | | `--reverse` | Spells the name backwards. Applies to the default name too. | |
| Document --shout, --version and --times in README usage | 13 | | `--version` | Prints the crate version and exits. | |
| 14 | | `--times N` | Prints the greeting `N` times. Defaults to 1. | | |
| Merge #55: Document --lang in the README usage section | 15 | | `--lang LANG` | Greets in the given language. Supported values are `en`, `es` and `fr`. Defaults to `en`. | |
| Document every command-line option in the README | 16 | | `--loud`, `-L` | Ends the greeting with `!!!` instead of `!`. | |
| 17 | | `--bye` | Prints `Goodbye, NAME!` after the greeting. | | |
| Catch up with main | 18 | | `--both` | Prints the greeting and `Goodbye, NAME!` on one line. | |
| Document every command-line option in the README | 19 | | `--wave` | Prints `o/` after the greeting. | |
| 20 | | `--quiet` | Prints no greeting at all. `--version` still prints the version. | | |
| Add Usage section to README | 21 | |
| Greet people from the command line | 22 | ```sh |
| 23 | $ cargo run -- Ada | |
| Merge #42: Greet with Hi instead of Hello | 24 | Hi, Ada! |
| Greet people from the command line | 25 | ``` |
| 26 | ||
| Document --shout, --version and --times in README usage | 27 | ```sh |
| 28 | $ cargo run -- --shout Ada | |
| Merge #42: Greet with Hi instead of Hello | 29 | HI, ADA! |
| Document --shout, --version and --times in README usage | 30 | ``` |
| 31 | ||
| 32 | ```sh | |
| 33 | $ cargo run -- --times 2 Ada | |
| Merge #42: Greet with Hi instead of Hello | 34 | Hi, Ada! |
| 35 | Hi, Ada! | |
| Document --shout, --version and --times in README usage | 36 | ``` |
| 37 | ||
| 38 | ```sh | |
| Merge #55: Document --lang in the README usage section | 39 | $ cargo run -- --lang es Ana |
| 40 | ¡Hola, Ana! | |
| 41 | ``` | |
| 42 | ||
| 43 | ```sh | |
| 44 | $ cargo run -- --lang fr Luc | |
| 45 | Bonjour, Luc ! | |
| 46 | ``` | |
| 47 | ||
| 48 | ```sh | |
| Document --shout, --version and --times in README usage | 49 | $ cargo run -- --version |
| 50 | 0.1.0 | |
| 51 | ``` | |
| 52 | ||
| Document every command-line option in the README | 53 | 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. |
| Greet people from the command line | 54 | |
| Add Examples section to the README | 55 | ## Examples |
| 56 | ||
| 57 | ```sh | |
| 58 | $ cargo run -- --shout --times 2 Ada | |
| 59 | HI, ADA! | |
| 60 | HI, ADA! | |
| 61 | ``` | |
| 62 | ||
| 63 | ```sh | |
| 64 | $ cargo run -- --lang es --times 2 Ana | |
| 65 | ¡Hola, Ana! | |
| 66 | ¡Hola, Ana! | |
| 67 | ``` | |
| 68 | ||
| 69 | ```sh | |
| 70 | $ cargo run -- --shout --lang fr Luc | |
| 71 | BONJOUR, LUC ! | |
| 72 | ``` | |
| 73 | ||
| Show program output in README | 74 | ## Output |
| 75 | ||
| 76 | ```sh | |
| 77 | $ cargo run -- Grace | |
| Show Hi in README output example | 78 | Hi, Grace! |
| Show program output in README | 79 | ``` |
| 80 | ||
| Greet people from the command line | 81 | ## Develop |
| 82 | ||
| Mention Rust edition in README Develop section | 83 | This project uses the Rust 2021 edition. |
| 84 | ||
| Greet people from the command line | 85 | ```sh |
| 86 | cargo test | |
| 87 | ``` | |
| Merge main into main | 88 | |
| Add CI workflow for formatting, lints and tests | 89 | Every pull request runs formatting, lints and tests. |
| 90 | ||
| Add Troubleshooting section to README | 91 | ## Troubleshooting |
| 92 | ||
| 93 | **`error: --times value must be a number, got "abc"`** | |
| 94 | ||
| 95 | `--times` needs a whole number of zero or more. If the value is anything else, such as `abc`, `-1` or `2.5`, the program prints this error to stderr and exits with status 2 without greeting anyone. Pass a plain number, for example `--times 3`. A `--times` with no value after it also fails, with `--times requires a value`. | |
| 96 | ||
| Merge #42: Greet with Hi instead of Hello | 97 | **The greeting says `Hi, world!` when I gave a name** |
| Add Troubleshooting section to README | 98 | |
| 99 | An empty or whitespace-only name, such as `cargo run -- ""`, is treated as no name and the greeting uses `world`. It does not fall back to the `USER` environment variable; that only happens when no name argument is given at all. Check that your shell is not expanding the name to an empty string, for example from an unset variable like `"$NAME"`. | |
| 100 | ||
| Merge #55: Document --lang in the README usage section | 101 | **`error: --lang value must be one of en, es, fr, got "de"`** |
| 102 | ||
| 103 | `--lang` only accepts `en`, `es` or `fr`. For any other value the program prints this error to stderr and exits with status 2 without greeting anyone. Pass one of the supported languages, for example `--lang es`. | |
| 104 | ||
| Merge main into main | 105 | ## License |
| 106 | ||
| 107 | This project is licensed under the MIT License. | |
| Link MIT license text from README License section | 108 | The full license text is available at https://opensource.org/license/mit. |
This file's history is long; its oldest lines are credited to the oldest commit read.