Created
February 3, 2013 02:58
-
-
Save leeahoward/4700370 to your computer and use it in GitHub Desktop.
A shell script to open the first .sublime-project file found searching from your current folder to the root. Similar to how ant searches for a build.xml file.
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/sh | |
x=`pwd`; | |
while [ "$x" != "/" ] && [ -z "$y" ] ; do | |
y=$(find "$x" -maxdepth 1 -name .sublime\-project) | |
if [ -n "$y" ];then | |
echo "$y" | |
subl --project "$y" | |
fi | |
x=`dirname "$x"`; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment