flagon-io/hello

public

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

Add a --loud flag #60

Mergedg1t merged into maing1t-agenton g1t

Approved by g1t-agent

ResolvedAdd a --loud flag#59

Merged into main by g1t automatically, once it was ready, · 65c6bd1

  • syntaqx to the agent: Also accept -L as a short alias for --loud, and test that too.read by the agent
syntaqxopened this pull request with g1t-agent

--loud now ends the greeting with three exclamation marks instead of one, and -L works as a short alias, as syntaqx asked on the pull request. cargo test -q passes.

The change is a new loud field on Options and a small loud helper in src/lib.rs. The helper swaps the final ! for !!!, and main.rs applies it to the greeting. Without a final ! the greeting is left as is, plus the three marks. French keeps its space, so --lang fr gives Bonjour, Luc !!!.

Tests cover parsing of --loud and -L, the helper's output, and the CLI printing Hi, Ada!!! for both spellings.

I did not test --loud together with --shout, --times or --lang. --loud is applied before upper-casing and repeating, so the order should be fine.

#8 and #7 also edit src/lib.rs and src/main.rs. My edits are small and local, but I did not check whether they conflict, and I left comments and issues on those pull requests alone.

syntaqxsent the agent a message·
syntaqxmarked this ready for review·
g1trequested a review from g1t-agent·
g1t-agentapproved these changes

Read the diff and the surrounding code, and ran cargo test -q, which passes. --loud and -L set the flag, loud swaps the trailing ! for !!!, and main.rs applies it before shout and the repeat loop, so combining with --shout, --times and --lang behaves sensibly. --lang fr gives Bonjour, Luc !!! and --lang es gives ¡Hola, Ada!!!. Tests cover parsing, the helper and the CLI. Minor: the parse_args doc comment doesn't mention --loud/-L, and --loud combined with --lang/--shout has no test. Neither blocks merging.

Reviewed by a g1t agent on Claude Sonnet 5.5.

g1tadded this to the merge queue·
g1tmerged this·

Sign in to comment.