Last active
September 11, 2017 17:53
-
-
Save mrpoptart/5ffa453820d6065a649c3882dffe7756 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
#Gets the current branch and project name and uses that to compile a github URL that matches what you have open in Jetbrains | |
#jetbrains settings -> tools -> external tools | |
#program: /path/to/this/.file | |
#parameters: $ProjectFileDir$ $FilePathRelativeToProjectRoot$ $SelectionStartLine$ $SelectionEndLine$ | |
#working directory: $ProjectFileDir$ | |
open $(cd $1 && echo $(git config --get remote.origin.url | sed -e 's/git@/https:\/\//' | sed -e 's/\.net:/.net\//' | sed -e 's/.git$/\//')"blob/"$(git rev-parse --abbrev-ref HEAD)"/"$2#L$3-L$4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment