Skip to content

Instantly share code, notes, and snippets.

@zporter
Created June 28, 2019 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zporter/b5a42bc823df149208f9b1ccdf1162bb to your computer and use it in GitHub Desktop.
Save zporter/b5a42bc823df149208f9b1ccdf1162bb to your computer and use it in GitHub Desktop.
Oh-my-zsh plugin for opening a Github PR
function github_repo_path() {
git remote -v | egrep -io -m 1 "github.com[:/]([a-z/-]+)" | sed 's/github.com[:\/]//'
}
function ggpr {
open "https://github.com/$(github_repo_path)/pull/new/$(git_current_branch)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment