Skip to main content
3 of 3
remove comment re python as that is Sublime 3
mmmmmm
  • 31k
  • 18
  • 94
  • 158

You can easily add the Applications directory to your PATH but it will not do anything useful as it is a collection of OSX apps which are bundles and can't be run from the command line.

There are several alternatives

  1. Use the open command which will open any OSX app e.g. open -a Sublime\ Text.app source.php This works for all apps
  2. Find the unix executable in the app bundle usually in Contents/MacOS and with a similar name to the app.
  3. Some apps e.g. Sublime provide a specific command line tool and use that. This is what is suggested in Sublime's documentation However I would just create an alias to the full path "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" and use the full path in the EDITOR environment variable
mmmmmm
  • 31k
  • 18
  • 94
  • 158