Add long_desc and split -h from --help - #160
Open
aaronmallen wants to merge 1 commit into
Open
Conversation
Split `-h` and `--help` handling: `-h` prints the short description set via `desc`, while `--help` prints the long description set via the new `long_desc` DSL (on both commands and namespaces), falling back to the short description when unset. Command listings continue to use `desc`.
aaronmallen
force-pushed
the
add-long-about
branch
from
July 31, 2026 23:50
d68b30e to
2c88194
Compare
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.
Commands and namespaces can now set a long description with
long_desc.-hprints theshort description from
desc;--helpprints the long one. This mirrors how Clap treatsaboutandlong_aboutin Rust.How
user asked for long help.
back to description; short help always uses description. Multi-line text now indents
under the Description: heading, and blank lines stay blank.
Compatibility
Commands without long_desc print the same output for both flags, so nothing changes for
existing CLIs. All 328 existing specs pass untouched; six new specs cover the split, the
fallback, and namespaces.