Created
July 13, 2010 16:10
-
-
Save alkema/474108 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
# github + launchy = gaunchy | |
# open your current repo (+ path) in your browser | |
# $ gaunchy.rb app/models | |
require 'rubygems' | |
require 'git' | |
require 'launchy' | |
g = Git.open('.') | |
path = g.remote('origin').url.split(':').last.gsub('.git', '') | |
url = "https://github.com/#{path}" | |
url += "/tree/master/#{ARGV.first}" if ARGV.first | |
Launchy.open(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment