ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Fix Mac Path

by int3h Mac ALL

A Sublime Text 2/3 plugin to set the PATH correctly on OS X

Labels terminal, repl

Details

  • 1.1.1
  • github.​com
  • github.​com
  • 10 years ago
  • 20 minutes ago
  • 11 years ago

Installs

  • Total 25K
  • Win 2
  • Mac 25K
  • Linux 0
Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 1 2 0 1 1 0 0 1 0 4 2 1 0 1 0 1 2 2 2 0 1 2 1 3 2 0 0 1 2 1 2 0 1 0 0 0 1 0 0 1 0 2 1 2 0 1
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

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 subl command.)

Install

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.

Options

You can optionally set the following option to your user preferences:

  • "additional_path_items": []

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 ~/Desktop and ~/bin to the shell's PATH in Sublime Text, you would use "additional_path_items": ["~/Desktop", "~/bin"].