On OS X 10.7.5, I have ST2 installed at /Applications/Sublime Text 2.app and ST3 at /Applications/Sublime Text 3 Beta.app.
I’ve linked /usr/local/bin/subl according to the instructions, and it’s on my PATH. I can run subl --help fine, but attempting to edit a file gives the message “Unable to find Sublime Text”.
If you’re not given the path to ‘subl’ as $0 in the running program, perhaps you can run a shell which subl and inspect the link to determine the location of Sublime Text?
[743:~/Develop] $ subl
Unable to find Sublime Text
[744:~/Develop] $ which subl
/usr/local/bin/subl
[745:~/Develop] $ ll which subl
lrwxrwxr-x 1 xxxx staff 69 May 14 11:22 /usr/local/bin/subl@ -> /Applications/Sublime Text 3 Beta.app/Contents/SharedSupport/bin/subl
[746:~/Develop] $ subl --help
Sublime Text build 3033
Usage: subl [arguments] [files] edit the given files
or: subl [arguments] [directories] open the given directories
or: subl [arguments] - edit stdin
Arguments:
–project : Load the given project
–command : Run the given command
-n or --new-window: Open a new window
-a or --add: Add folders to the current window
-w or --wait: Wait for the files to be closed before returning
-b or --background: Don’t activate the application
-s or --stay: Keep the application activated after closing the file
-h or --help: Show help (this message) and exit
-v or --version: Show version and exit
–wait is implied if reading from stdin. Use --stay to not switch back
to the terminal when a file is closed (only relevant if waiting for a file).
Filenames may be given a :line or :line:column suffix to open at a specific
location.