Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 21 lines (16 sloc) 0.338 kb
#!/bin/sh
# Usage: `git examine <url>`
#
# * opens the github page if it found the file
#
# Only for the Mac.
if [[ $1 ]]; then
FILE=$1
else
FILE=''
fi
ROOT=$(git config remote.origin.url | perl -pi -e 's%^.*:(.*).git%https://github.com/\1/blob/master%')
echo $ROOT/$FILE '\c' | pbcopy
echo $FILE
# Open the browser.
open $ROOT/$FILE
Jump to Line
Something went wrong with that request. Please try again.