Skip to content

Instantly share code, notes, and snippets.

@sikachu
Created August 11, 2009 05:19
Show Gist options
  • Save sikachu/165645 to your computer and use it in GitHub Desktop.
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
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