updated cb function

master
chatton 3 years ago
parent 57f0785037
commit 7772c8150c

@ -12,15 +12,17 @@ function _branches() {
echo "$1" echo "$1"
return return
else else
git for-each-ref --sort=committerdate refs/heads/ | awk -F'heads/' '{ print $NF }' | fzf git for-each-ref --sort=committerdate refs/heads/ | awk -F'heads/' '{ print $NF }' | tail -r | fzf
fi fi
} }
function cb() { function cb() {
gh co if [[ "$(git status -s)" ]]; then
# gh alias set co --shell 'id="$(gh pr list -L100 | fzf | cut -f1)"; [ -n "$id" ] && gh pr checkout "$id"' git stash
# branch=$(_branches) fi
# git checkout "${branch}"
branch=$(_branches)
git checkout "${branch}" > /dev/null 2>&1
} }
# gh pr list | fzf | awk '{print $1}' | gh pr view --web # gh pr list | fzf | awk '{print $1}' | gh pr view --web

Loading…
Cancel
Save