Permalink
Browse files

script to show Github blame view of current file

  • Loading branch information...
1 parent b387f5f commit 744b81da47904066d5b9a5d403100589cccad130 @rwilcox committed Sep 28, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 Contents/Scripts/git/github_show_blame_current_file.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+
+cd "$(dirname "$BB_DOC_PATH")"
+
+gitroot=$(git rev-parse --show-toplevel)
+
+smallpath=$(ruby -e "puts '$BB_DOC_PATH'.gsub('$gitroot/', '')")
+
+open "`git config bbedit.githuburl`/blame/$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')/$smallpath"

0 comments on commit 744b81d

Please sign in to comment.