Skip to content

Instantly share code, notes, and snippets.

@jbottigliero
Created April 7, 2012 23:00
Show Gist options
  • Save jbottigliero/2332709 to your computer and use it in GitHub Desktop.
Save jbottigliero/2332709 to your computer and use it in GitHub Desktop.
Simple shell script to quickly open projects in Sublime Text 2
#! /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
@jbottigliero
Copy link
Author

Updated to use subl Sublime Text 2's built in command line tool, more information...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment