Open Bitbucket pull request web page from command line
Add this functions to your .bashrc
function pullrequest() {
remote=$(command git remote -v | head -1 | sed "s/.*:\(.*\)\.git.*/\1/")
if [[ -n ${remote} ]] ; then
gnome-open https://bitbucket.org/$remote/pull-request/new > /dev/null 2> /dev/null
else
echo Not found remote
fi
}
For Mac OS X you can substitute gnome-open
with open
.
Written by Miguel Gonzalez
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Command line
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#