Skip to content

Commit

Permalink
moved github-go command to git file, rewrote for clarity
Browse files Browse the repository at this point in the history
(cherry picked from commit fb7c929)

Conflicts:

	06_git
  • Loading branch information
ryanfb committed Aug 19, 2008
1 parent 7982519 commit b212e6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions 05_editor
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,4 @@ if [[ $OSTYPE[1,6] == "darwin" ]]; then
ps pdf html dmg; do
alias -s $s=open
done

# Seems to be the best OS X jump-to-github alias from http://tinyurl.com/2mtncf
alias github="open \`git config -l | grep 'remote.origin.url' | sed -En \
's/remote.origin.url=git(@|:\/\/)github.com(:|\/)(.+)\/(.+).git/https:\/\/github.com\/\3\/\4/p'\`"
fi
9 changes: 9 additions & 0 deletions 06_git
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,13 @@ if [[ -x `which git` ]]; then
}
alias revert='git reset --hard'

function github-url () {
git config remote.origin.url | sed -En 's/git(@|:\/\/)github.com(:|\/)(.+)\/(.+).git/https:\/\/github.com\/\3\/\4/p'
}

# Seems to be the best OS X jump-to-github alias from http://tinyurl.com/2mtncf
function github-go () {
open $(github-url)
}

fi

0 comments on commit b212e6b

Please sign in to comment.