Fix Mac Path
A Sublime Text 2/3 plugin to set the PATH correctly on OS X
- Total 22K
- Win 2
- Mac 22K
- Linux 0
|Oct 24||Oct 23||Oct 22||Oct 21||Oct 20||Oct 19||Oct 18||Oct 17||Oct 16||Oct 15||Oct 14||Oct 13||Oct 12||Oct 11||Oct 10||Oct 9||Oct 8||Oct 7||Oct 6||Oct 5||Oct 4||Oct 3||Oct 2||Oct 1||Sep 30||Sep 29||Sep 28||Sep 27||Sep 26||Sep 25||Sep 24||Sep 23||Sep 22||Sep 21||Sep 20||Sep 19||Sep 18||Sep 17||Sep 16||Sep 15||Sep 14||Sep 13||Sep 12||Sep 11||Sep 10||Sep 9|
Fix Mac Path
On OS X, Sublime Text has its PATH set by launchctl, not by your shell1. Commands like
make run by Sublime Text are then unable to find non-system binaries, including those installed by homebrew and MacPorts.
Fix Mac Path is a simple plugin for Sublime Text 2 and 3 which sets Sublime Text's PATH to that reported by your shell. Now, if you add homebrew's
/usr/local/bin directory to your PATH in .bash_profile (or whatever other way you set your shell's PATH,) Sublime Text will inherit that PATH.
1: This isn't true if you launch Sublime Text from within your shell (e.g., with the
Fix Mac Path is for Sublime Text 2 and 3 running on Mac OS X. (Other platforms don't suffer from the problem this plugin fixes, to my knowledge, so it isn't needed.)
The easiest way to get this is to use Package Control and search for “Fix Mac Path”.
To manually install Fix Mac Path, run
git clone https://github.com/int3h/SublimeFixMacPath.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/FixMacPath
for Sublime Text 2, or
git clone https://github.com/int3h/SublimeFixMacPath.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/FixMacPath
for Sublime Text 3.
You can optionally set the following option to your user preferences:
An array of strings of locations you wish to add to Sublime Text's PATH, in addition to those pulled from your shell.
For example, to add
~/bin to the shell's PATH in Sublime Text, you would use
"additional_path_items": ["~/Desktop", "~/bin"].