I wanted a simple shell command to open a sublime project in the root of my project folder even if I wasn't in the root, similar to how ant finds the build.xml. This seems to work on the mac, but I haven't done much shell scripting in a while. Try it if you like. Improve it if you can.
Project file must be named .sublime-projecthttps://gist.github.com/4700370
- Code: Select all
while [ "$x" != "/" ] && [ -z "$y" ] ; do
y=$(find "$x" -maxdepth 1 -name .sublime\-project)
if [ -n "$y" ];then
subl --project "$y"