View open-pull-request.sh
#!/usr/bin/env bash | |
if [[ $(uname -s) == "Linux" ]]; then | |
browse="xdg-open" | |
else | |
browse="open" | |
fi | |
repo=$(git remote show -n origin 2>/dev/null|sed -e "/Push URL:*/!d; s/.*git@github.com:\(.*\).git/\1/; q") | |
branch=$(git branch --no-color 2>/dev/null|sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') |