You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The help does not wrap the HelpSectionProvider header/footer #763
The help wraps the one-line command description and the option descriptions at the help width (#736 / #737), but the header and footer coming from a HelpSectionProvider (or the @CommandDefinitionheader/footer) are injected verbatim — they are never wrapped.
In AeshCommandLineParser, injectHeader(...) only runs resolveDescriptionVariables(...) on the header content and splices it into the help text; there is no wrap pass like the one descriptions get. So a provider that returns a prose paragraph has to pre-wrap it with hard \n, and those breaks are then stuck at whatever column the author guessed.
Why it matters
Since #758 the rest of the help follows the live terminal width, so a pre-wrapped header is now wrong on both sides:
wide terminal: prose stays wrapped at ~80 while everything else uses the full width;
narrow terminal: prose overruns the width while the options below it wrap correctly.
A provider can't fix this itself: HelpContext carries command/name/fullName/format but not the resolved width, so getHeader(HelpContext) has no way to wrap at the right column without re-implementing the aesh.help.width → COLUMNS → terminal → 80 resolution that #758 just centralized.
Repro
A command whose HelpSectionProvider.getHeader() returns a long paragraph with no \n:
Creates a new script from a template, ready to run with `jbang <file>`. The template is picked from the file extension unless you choose one with --template; ... (one long line)
--help at COLUMNS=100 and at COLUMNS=60 prints that paragraph identically as a single unwrapped line, while the option descriptions directly below it wrap to the width.
Proposal
Wrap the injected header and footer at the resolved help width, reusing the same wrap logic as the description/option wrapping (#737) and the width resolution from #758. A hard \n already in the text should still be honored as an explicit break; only the soft wrapping is added. Then providers can return plain sentences and let aesh wrap them like everything else.
Related: #736 / #737 (wrap long descriptions), #758 (resolve help width from the terminal).
Implemented: header/footer text (provider or annotation) now wraps at the resolved help width using the same wrapping as descriptions, with hard line breaks kept as explicit breaks. Applies at both header positions and the footer. No HelpContext change needed — wrapping happens server-side at render time.
Activity
Wrap help headers and footers at the help width (#763)
stalep commentedon Nov 11, 2026
Implemented: header/footer text (provider or annotation) now wraps at the resolved help width using the same wrapping as descriptions, with hard line breaks kept as explicit breaks. Applies at both header positions and the footer. No HelpContext change needed — wrapping happens server-side at render time.
Keep indented header/footer lines out of wrapping (#763)
camel-jbang: upgrade aesh 3.19.1, and @file arguments again (#29745)