Skip to content

Support aliases deeper than top level, e.g. gh pr co #1303

@issyl0

Description

@issyl0

Describe the feature or problem you’d like to solve

I type gh pr checkout many times a day. Typing checkout is long. I have shell aliases for git checkout: gco. That muscle memory could carry over to gh pr checkout too, with the gh pr co command alias.

I'd like to think that this affects many people using gh pr checkout: not just me. But I've not done any research to verify that thought.

Proposed solution

Add an alias for co to the pr_checkout command.

I considered some alternatives, like the existing tab completions. While they do work as intended, gh pr c<tab><tab> and gh pr ch<tab> take three keypresses, and are different from the "usual" co abbreviation for checkout.

I've got the change ready to go locally - but as per the contributing guide, I'm submitting an issue first to see if there's an appetite for this!

Additional context

Thanks for building the gh tool!

Metadata

Metadata

Assignees

Labels

coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions