Commit 6fc943a 1 parent 3fa3959 commit 6fc943a Copy full SHA for 6fc943a
File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ alias ls='ls --color'
5
5
alias ghqcd=' `ghq list --full-path | peco`'
6
6
alias gs=' git status'
7
7
alias gsw=' git switch `git branch | peco`'
8
+ alias gswpr=' peco-checkout-pull-request'
8
9
alias tree=' cmd="command tree -a -I .git"; echo $cmd; eval ${cmd}'
9
10
alias rmb=' git branch --merged | xargs -n 1 | egrep -v "main|develop|\*" | xargs git branch -d'
10
11
alias rm=' trash-put'
@@ -30,3 +31,11 @@ zshaddhistory() {
30
31
if type rbenv > /dev/null 2>&1 ; then
31
32
eval " $( rbenv init - zsh) "
32
33
fi
34
+
35
+ # # Checkout PR
36
+ function peco-checkout-pull-request () {
37
+ local selected_pr_id=$( gh pr list | peco | awk ' { print $1 }' )
38
+ if [ -n " $selected_pr_id " ]; then
39
+ gh pr checkout $selected_pr_id
40
+ fi
41
+ }
You can’t perform that action at this time.
0 commit comments