ghco: default to listing own PRs
This commit is contained in:
parent
1d4b531daa
commit
82385f343f
11
script/ghco
11
script/ghco
|
@ -5,7 +5,16 @@ set -e
|
|||
|
||||
export GH_NO_UPDATE_NOTIFIER=1
|
||||
|
||||
prid=$(gh pr list --limit 100 | fzf | awk '{print $1}')
|
||||
if [ "$1" = '-a' ]; then
|
||||
cmd='gh pr list --limit 100'
|
||||
elif [ -z "$GITHUB_USERNAME" ]; then
|
||||
echo 'set $GITHUB_USERNAME first'
|
||||
exit 1
|
||||
else
|
||||
cmd="gh pr list --author $GITHUB_USERNAME"
|
||||
fi
|
||||
|
||||
prid=$(eval "$cmd" | fzf | awk '{print $1}')
|
||||
if [ -z $prid ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue