gh: co = pr checkout instead of custom script
This commit is contained in:
parent
514fcdf589
commit
6ecfd3a715
1 changed files with 1 additions and 3 deletions
|
|
@ -9,9 +9,7 @@ prompt: enabled
|
||||||
pager:
|
pager:
|
||||||
# Aliases allow you to create nicknames for gh commands
|
# Aliases allow you to create nicknames for gh commands
|
||||||
aliases:
|
aliases:
|
||||||
co: >
|
co: pr checkout
|
||||||
!(ref="$(gh pr view "$1" --json 'headRefName' --jq '.headRefName')" && git fetch-branch "$ref" && git switch "$ref")
|
|
||||||
|
|
||||||
prw: pr view -w
|
prw: pr view -w
|
||||||
commit: >
|
commit: >
|
||||||
!(repo=$(gh repo view --json url --jq .url) && ref="${1-HEAD}" && commit=$(git rev-parse "$ref") && open "${repo}/commit/${commit}")
|
!(repo=$(gh repo view --json url --jq .url) && ref="${1-HEAD}" && commit=$(git rev-parse "$ref") && open "${repo}/commit/${commit}")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue