Skip to content

feat(cli): resolve unambiguous bare subcommands and suggest others - #236

Merged
marcociav-exmergo merged 3 commits into
exmergo:mainfrom
AshSgDe29071999:fix/bare-subcommand-suggestion
Aug 7, 2026
Merged

feat(cli): resolve unambiguous bare subcommands and suggest others#236
marcociav-exmergo merged 3 commits into
exmergo:mainfrom
AshSgDe29071999:fix/bare-subcommand-suggestion

Conversation

@AshSgDe29071999

Copy link
Copy Markdown
Contributor

Summary

Bare subcommands like dex check produced a raw argparse “invalid choice” error with no recovery hint.

Changes

  • Rewrite unambiguous bare subcommands to their group (e.g. checkmaintain check).
  • On remaining parse failures, print a suggestion naming the canonical group form (or all candidates if ambiguous).

Closes #198

@marcociav-exmergo marcociav-exmergo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AshSgDe29071999 thanks for this. pls add a brief summary of your changes to the CHANGELOG.MD, under Unreleased

@AshSgDe29071999

Copy link
Copy Markdown
Contributor Author

Added Unreleased CHANGELOG entry for bare subcommand resolution and suggestions.

Closes exmergo#198

`dex check` failed with a raw argparse group error. Accept unambiguous
bare subcommands (e.g. check -> maintain check) and suggest the canonical
form when argparse still refuses (including ambiguous names).
@AshSgDe29071999
AshSgDe29071999 force-pushed the fix/bare-subcommand-suggestion branch from 2802777 to bebebaf Compare August 7, 2026 12:51

@marcociav-exmergo marcociav-exmergo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @AshSgDe29071999

@marcociav-exmergo
marcociav-exmergo merged commit 22b8699 into exmergo:main Aug 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: accept an unambiguous bare subcommand, or suggest the group

2 participants