Created
November 16, 2010 14:45
-
-
Save botanicus/701891 to your computer and use it in GitHub Desktop.
ZSH: gh_open for opening current repo's page in browser.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open GitHub page for the current repository. | |
# | |
# Example: | |
# $ git clone https://github.com/majek/puka.git | |
# $ cd puka | |
# $ gh_open # Browser: https://github.com/majek/puka | |
function gh_open { | |
open $(git config remote.origin.url | ruby -ne 'puts "https://" + $_.split(%r{[/:@]})[1..-1].join("/").sub(/\.git$/, "")') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very useful thanks