Skip to content

Implement better command aliases to avoid duped help outupt#33

Merged
bjester merged 1 commit intomainfrom
better-aliases
Apr 18, 2026
Merged

Implement better command aliases to avoid duped help outupt#33
bjester merged 1 commit intomainfrom
better-aliases

Conversation

@bjester
Copy link
Copy Markdown
Owner

@bjester bjester commented Apr 18, 2026

Summary

  • dynamically replaces alias with full command in sys args
  • corrects naming issue with built-in python-fire completion
  • adds tests for changes

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 18, 2026

🎉 Build Assets are ready!

Type File Checksum
Wheel gh_worktree-0.3.2-py3-none-any.whl cd9f37d75894a2dffe809f1f0f06da80e9171f2981ed48ebd45e67060040e724
PEX gh-worktree.pex 9a01b051ed29ca1308be2257631a0aa89575ce224a5f0067bd0260e61ae6923e
Binary gh-worktree c085903bb91cc6964fd8a5fc7c9e5cb76b8c19bcea9b8cd5d00a4b569955f6ad

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces command alias support for the gh-worktree CLI. It adds an AliasConflictError exception, implements an _alias_map property in WorktreeCommands to manage command aliases, and includes a replace_alias function in the CLI module to resolve aliases from system arguments. Feedback highlights a bug in the AliasConflictError string interpolation and suggests optimizing the replace_alias function by caching the alias map and removing an unnecessary .keys() call.

Comment thread src/gh_worktree/main.py
Comment thread src/gh_worktree/cli.py
- dynamically replaces alias with full command in sys args
- corrects naming issue with built-in python-fire completion
- adds tests for changes
@bjester bjester merged commit bead141 into main Apr 18, 2026
13 checks passed
@bjester bjester deleted the better-aliases branch April 18, 2026 17:04
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.

1 participant