Created
February 8, 2018 11:35
-
-
Save odnoletkov/d2a8cc3be089fd32742949ffd350832f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
tell application "Xcode" | |
set CurrentDocument to document 1 whose name ends with (get name of front window) | |
set FilePath to path of CurrentDocument | |
set {start, _} to selected paragraph range of CurrentDocument | |
tell application "Terminal" | |
do script "FILE=\"" & FilePath & "\"; cd \"$(dirname \"$FILE\")\"; cd \"$(git rev-parse --show-toplevel)\"; tig blame +" & start & " \"$FILE\"" | |
activate | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment