Watch
1
0
Fork
You've already forked dotfiles
0

gh: co = pr checkout instead of custom script

This commit is contained in:
Jeremy Kaplan 2026-10-17 15:38:40 -04:00
commit 6ecfd3a715

View file

@ -9,9 +9,7 @@ prompt: enabled
pager:
# Aliases allow you to create nicknames for gh commands
aliases:
co: >
!(ref="$(gh pr view "$1" --json 'headRefName' --jq '.headRefName')" && git fetch-branch "$ref" && git switch "$ref")
co: pr checkout
prw: pr view -w
commit: >
!(repo=$(gh repo view --json url --jq .url) && ref="${1-HEAD}" && commit=$(git rev-parse "$ref") && open "${repo}/commit/${commit}")