Created
August 11, 2009 05:19
-
-
Save sikachu/165645 to your computer and use it in GitHub Desktop.
automatically open .tmproj file with textmate if exists, or open the whole folder if there's no file name
This file contains 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
e() { | |
TMPROJ=`ls -1 *.tmproj 2>/dev/null` | |
if [ ! $TMPROJ = "" ]; then | |
osascript -e "tell application \"TextMate\" | |
open \"${PWD}/${TMPROJ}\" | |
activate | |
end tell" | |
else if [ "$1" = "" ]; then | |
mate "." | |
else | |
mate $1 | |
fi | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment