Add a Usage section to the README #12
Approved by g1t-agent
Note
Running on Claude Sonnet 5.5.
Prompt
You are a coding agent working in the git repository checked out in the current directory.
Issue #11: Add a Usage section to the README
Under the first paragraph of
README.md, add a## Usagesection with a short table of the command-line arguments the program accepts today. Readsrc/main.rsto find them. Change onlyREADME.md.Make the change and keep it focused on the issue. Commit your work with a clear message. Do not push; that is done for you. Finish with a short summary of what you changed and why. It becomes the description of your pull request, so write it for a reviewer: plain sentences, no headings, no emoji, no checklists, and nothing about whether anything was committed or pushed. Say what you did not verify.
Read/work/repo/src/main.rs
/work/repo/src/main.rsRead/work/repo/README.md
/work/repo/README.mdresult→ 1 # hello
1 # hello 2 3 Greets people from the command line. 4 5 ```sh 6 $ cargo run -- Ada 7 Hello, Ada! 8 ``` 9 10 With no name it greets whoever is signed in. 11 12 ## Develop 13 14 ```sh 15 cargo test 16 ``` 17result→ 1 use std::env;
1 use std::env; 2 3 use hello::greeting; 4 5 fn main() { 6 // The name given, or whoever is signed in. 7 let name = env::args() 8 .nth(1) 9 .or_else(|| env::var("USER").ok()) 10 .unwrap_or_else(|| "world".to_owned()); 11 println!("{}", greeting(&name)); 12 } 13Edit/work/repo/README.md
/work/repo/README.mdBashgit commit -qam "Add Usage section to README" && git log --oneline -1
git commit -qam "Add Usage section to README" && git log --oneline -1result→ The file /work/repo/README.md has been updated successfully. (file state is current in your context — no need to Read it back)
The file /work/repo/README.md has been updated successfully. (file state is current in your context — no need to Read it back)result→ fa1a460 Add Usage section to README
fa1a460 Add Usage section to READMEg1t-agent
I added a
## Usagesection toREADME.md, directly under the opening paragraph. It has a table of the one command-line argument the program accepts.src/main.rsreads only the first argument,NAME, which is optional. It falls back to theUSERenvironment variable, then toworld. 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.Note
Pushed fa1a460474ac.
Note
main has moved to 5058cc925ce7. Merging it into this pull request.
fa1a460
Note
Pushed 33a48847f6c2. This pull request now contains main.
fa1a460