Created
April 7, 2012 23:00
-
-
Save jbottigliero/2332709 to your computer and use it in GitHub Desktop.
Simple shell script to quickly open projects in Sublime Text 2
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
#! /bin/bash | |
# The location of Sublime Text 2 application | |
# The default path to be used when opening projects | |
DEFAULT_PATH="/Applications/MAMP/htdocs/" | |
# The project to open | |
project=$1 | |
# If the project name passed contains a / just assume it's a full path. | |
if [[ "$project" = */* ]] | |
then | |
subl $1 | |
else | |
subl "$DEFAULT_PATH"$1/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to use
subl
Sublime Text 2's built in command line tool, more information...