-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
enhancementa request to improve CLIa request to improve CLI
Description
Describe the feature or problem you’d like to solve
Git's aliases are extremely useful.
I'd be great to have alias support for github's cli aswell!
As mentioned in #251 (comment), I currently use aliases together with https://github.com/github/hub, such as:
# replace `sarpik` with your github username
[alias]
prme = pull-request --push -a sarpik --base master -epo # targets upstream
prmee = !hub pull-request --push -a sarpik --base sarpik:master -epo --head sarpik:"$(git symbolic-ref --short HEAD)" # targets origin (your repo)
prmed = pull-request --push -a sarpik --base master -depo # targets upstream
prmeed = !hub pull-request --push -a sarpik --base sarpik:master -depo --head sarpik:"$(git symbolic-ref --short HEAD)" # targets origin (your repo)Proposed solution
Have them aliases! Preferably as close to git's configuration as possible, for simplicity's sake.
Additional context
Since hub was a proxy for git, it was easy & simple to just create git's aliases (as mentioned above) for hub itself, since git could be aliased to hub.
However, it isn't clear to me right now whether gh will be available for use as a proxy for git (see also https://github.com/cli/cli#comparison-with-hub).
Another solution would be to just call gh externally from git's aliases, like so:
[alias]
prls = !gh pr listjongio, bastilian, aero31aero, iainsmith, openjck and 1 more
Metadata
Metadata
Assignees
Labels
enhancementa request to improve CLIa request to improve CLI