Skip to content

Instantly share code, notes, and snippets.

@BenWard
Last active August 29, 2015 14:13
Show Gist options
  • Save BenWard/f2a7a764d5c6095dbd85 to your computer and use it in GitHub Desktop.
Save BenWard/f2a7a764d5c6095dbd85 to your computer and use it in GitHub Desktop.
A simple wrapper for `subl`, which handles opening explicit arguments, `sublime-project` definitions if present, or falls back to open the current directory.
function subl {
if [ -n "$1" ]; then
command subl $1
elif [ -f *.sublime-project ]; then
command subl *.sublime-project
else
command subl .
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment