Conversation
There was a problem hiding this comment.
Pull request overview
Updates ArgMojo’s CLI help generation to use a consistent 80-column two-column layout with wrapping, and adjusts shell completion/help expectations (including changes aimed at better handling of non-ASCII text).
Changes:
- Add shared help-layout constants and new wrapping/formatting helpers in
utils.mojo. - Refactor
Command._generate_help()sections (usage/options/commands/args) to use the new two-column formatting and wrap long content. - Update tests and examples to match the new help formatting and the built-in completions trigger naming/placeholder output.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_options.mojo | Makes deprecated-tag assertions less brittle to formatting/wrapping changes. |
| tests/test_help.mojo | Updates dynamic-padding test to account for overflow + wrapped descriptions. |
| tests/test_completion.mojo | Updates completion/help expectations for the built-in completions trigger and placeholder text. |
| src/argmojo/utils.mojo | Introduces 80-column help layout constants and wrapping/two-column formatting helpers. |
| src/argmojo/command.mojo | Refactors help generation to the new layout/wrapping; updates completions trigger default; improves Unicode-safe escaping loops. |
| examples/yu.mojo | Adds explicit newlines in CJK help strings to control wrapping/line breaks. |
| docs/argmojo_overall_planning.md | Marks 80-character help formatting as completed and adds planning notes. |
Comments suppressed due to low confidence (1)
src/argmojo/command.mojo:4907
- In
_fish_escape,text.codepoint_slices()yields slices; appendingchdirectly (result += ch) is inconsistent with_zsh_escape(which usesString(ch)) and may not type-check/compile. ConvertchtoStringbefore concatenation (and keep comparisons consistent) to ensure Unicode-safe escaping works.
for ch in text.codepoint_slices():
if ch == "'":
result += "\\'"
else:
result += ch
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates ArgMojo’s CLI help generation to use a consistent 80-column two-column layout with wrapping, and adjusts shell completion/help expectations (including changes aimed at better handling of non-ASCII text).
Changes:
utils.mojo.Command._generate_help()sections (usage/options/commands/args) to use the new two-column formatting and wrap long content.