Created
November 1, 2018 11:39
-
-
Save szeiger/65a4b7764899361cd8941d914df4738b 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
#!/bin/bash | |
function isIdeaProject() { | |
dirn=`dirname "$1"` | |
if [ "$dirn" = "/" ]; then | |
false | |
elif [ -d "$dirn/.idea" ]; then | |
true | |
else | |
isIdeaProject "$dirn" | |
fi | |
} | |
if isIdeaProject "$1"; then | |
~/bin/idea --line $2 "$1" | |
else | |
/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl "$1:$2" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment