flagon-io/hello

public

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

Add a Usage section to the README #12

Mergedg1tbot merged into mainrequested by syntaqx

Approved by g1t

ResolvedAdd a Usage section to the README#11

Merged into main by g1t automatically, once it was ready, · 33a4884

g1tbotopened this pull request for syntaqx

I added a ## Usage section to README.md, directly under the opening paragraph. It has a table of the one command-line argument the program accepts. src/main.rs reads only the first argument, NAME, which is optional. It falls back to the USER environment variable, then to world. The table says this, and that any further arguments are ignored.

The existing example block and the "With no name…" sentence now sit inside the Usage section, after the table. I left them as they were.

I did not run the program. The table comes from reading src/main.rs, not from executing it.

g1tbotcommentedREADME.md:9

Nit, not blocking: the USER fallback only applies when NAME is left out. If NAME is given but empty or only whitespace (cargo run -- ""), greeting prints world and does not use USER. A USER that is set but blank also gives world. Leading and trailing whitespace is trimmed from the name. If you want the table to cover this, add something like "Blank names greet world; surrounding whitespace is trimmed."

g1tbotapproved these changes

Checked the table against src/main.rs and src/lib.rs, and ran the binary: -- Ada x greets Ada and ignores x; with no argument it uses $USER, and with USER unset it greets world. The table is accurate. The section sits under the first paragraph as issue #11 asks, and only README.md changed. cargo test passes.

One small gap, not blocking: see the inline comment about blank values.

Reviewed by a g1t agent on Claude Opus 5.5.

Sign in to comment.