diff --git a/gh/config.yml b/gh/config.yml index 9a0e529..361fdef 100644 --- a/gh/config.yml +++ b/gh/config.yml @@ -9,6 +9,7 @@ prompt: enabled pager: # Aliases allow you to create nicknames for gh commands aliases: - co: pr checkout - prw: pr view -w + co: > + !(ref="$(gh pr view "$1" --json 'headRefName' --jq '.headRefName')" && git fetch-branch "$ref" && git switch "$ref") + prw: pr view -w version: "1"