Skip to content

fix(step): warn when alias shadows a built-in step command#1389

Merged
max-sixty merged 3 commits intomainfrom
worktree-agent-a8954f4b
Mar 9, 2026
Merged

fix(step): warn when alias shadows a built-in step command#1389
max-sixty merged 3 commits intomainfrom
worktree-agent-a8954f4b

Conversation

@max-sixty
Copy link
Copy Markdown
Owner

When aliases are configured with names that match built-in wt step subcommands
(e.g., commit, rebase), they're silently shadowed — clap intercepts the
command 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:

  • "Alias commit shadows a built-in step command and will never run"
  • "Aliases commit, rebase shadow built-in step commands and will never run"

This was written by Claude Code on behalf of @max-sixty

max-sixty and others added 3 commits March 8, 2026 15:56
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>
@max-sixty max-sixty merged commit bf6030b into main Mar 9, 2026
23 checks passed
@max-sixty max-sixty deleted the worktree-agent-a8954f4b branch March 9, 2026 02:12
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.

2 participants