Repository navigation
Leave a gap after the longest option in --help [patch] - #58
Merged
Merged
Conversation
The description column was the longest row's length + 2, but those two
characters went on the row's leading indent, so a 23-32 character option
ran straight into its description ("-r, --reason <explanation>Why it is
held."). Reserve the indent and a two-space gap when sizing the column and
when deciding to wrap. The built-in rows keep their column of 25.
Fixes #56
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW3e2AZDcKPKkvjAga2
|
This was referenced Nov 2, 2026
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.



Fixes #56
What was wrong
HelpText.Usageset the description column to the longest row's length + 2.AppendRowthen spent those two characters on the leading indent, so the longest row was padded to its own length and ran straight into its description:Change
AppendRowwraps when indent + text + gap doesn't fit, so a row can never be glued to its description.-f, --for <duration>, is 20 characters).Tests
Usage_LeavesAGapAfterTheLongestOptionwith a 23-character row (fits the default column), a 26-character row (widens it) and a 33-character row (wraps). The 23 and 26 cases fail onmainand pass with the fix.Usage_KeepsTheBuiltInRowsAtTheDefaultColumnpins the built-in layout, continuation line included.Generated by Claude Code