fix: make -h an alias for --help on every command#48
Merged
Conversation
clap's default help arg shows an abbreviated summary for -h and the full help text for --help. Register a global custom help arg with ArgAction::HelpLong instead and disable the default, so both flags print identical output across the root command and every subcommand for all cli-engine consumers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
jpage-godaddy
approved these changes
Jul 14, 2026
runruh-godaddy
approved these changes
Jul 14, 2026
rts1-godaddy
approved these changes
Jul 14, 2026
jpage-godaddy
pushed a commit
that referenced
this pull request
Jul 14, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.3](cli-engine-v0.4.2...cli-engine-v0.4.3) (2026-07-14) ### Bug Fixes * make -h an alias for --help on every command ([#48](#48)) ([9bd7f36](9bd7f36)) ### Miscellaneous * add pull request template ([#46](#46)) ([fe1600d](fe1600d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
-hbut the full text for--help. Registers a global custom help arg (ArgAction::HelpLong) and disables the default inregister_global_flags, so every cli-engine consumer gets identical-h/--helpoutput across the root command and every subcommand for free — no per-app workaround needed.godaddy-clirepo viawith_register_flags; moving it here lets that workaround be dropped.Test plan
cargo test --lib— newshort_and_long_help_flags_render_identical_outputtest passes; only pre-existing unrelated failure (install_zsh_writes_script_and_rc, a sandbox path issue reproducible on cleanmain) remainscargo clippy --all-targets -- -D warningscleancargo fmtcleansemgrep— 0 findings