fix(step): warn when alias shadows a built-in step command#1389
Merged
fix(step): warn when alias shadows a built-in step command#1389
Conversation
Aliases named after built-in subcommands (commit, push, rebase, etc.) are silently ignored because clap dispatches built-ins first. Now emits a warning so users know the alias will never run. Co-Authored-By: Claude <noreply@anthropic.com>
Handle singular/plural correctly ("Alias commit shadows..." vs "Aliases
commit, rebase shadow...") and bold alias names for consistency with
adjacent error messages.
Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
Mar 9, 2026
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.
When aliases are configured with names that match built-in
wt stepsubcommands(e.g.,
commit,rebase), they're silently shadowed — clap intercepts thecommand before the alias handler runs. This adds a warning when any alias
invocation detects shadowed names in the merged config.
Handles singular/plural grammar and bolds alias names for consistency with
adjacent error messages: