refactor(cli): remove auto-generated help subcommand from all subcommands#200
Merged
refactor(cli): remove auto-generated help subcommand from all subcommands#200
Conversation
98d8286 to
1860fe6
Compare
…ands Use `disable_help_subcommand = true` on every subcommand-bearing clap variant so the redundant `help` subcommand no longer appears in usage listings. The `-h`/`--help` flags remain fully functional. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
1860fe6 to
d91f2b4
Compare
Add help-text absence checks for root, config, and workspace, plus parse-rejection tests (InvalidSubcommand) for config auth, config mount, and workspace so a stale disable_help_subcommand annotation or a new unguarded subcommand can't slip through undetected. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
d91f2b4 to
8e30dd5
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.
Summary
disable_help_subcommand = trueto every clap variant that carries a nestedSubcommand, removing the redundanthelpentry from all command listingsCli,Command::Workspace,Command::Config, all fourConfigCommandvariants (Mount,Trust,Auth,Env), andWorkspaceCommand::Env-h/--helpflags are untouched and all 83 CLI tests passconfig auth help,config mount help,workspace help)Test plan
jackin config authno longer listshelpunder Commandsjackin configno longer listshelpunder Commandsjackin workspaceno longer listshelpunder Commandsjackin config auth --helpandjackin config auth -hstill workcargo test --lib cli::passes (83 tests)🤖 Generated with Claude Code