On Dec 7, 2006, at 12:05 PM, Rob McBroom wrote:
Does anyone know how to make TextMate generally/globally aware that `/usr/local/bin` exists now (as though it existed the first time I ran TextMate)? Thanks in advance.
TextMate uses the default login shell for most commands. This is a very basic shell, files like /etc/profile, .bash_profile etc don't get sourced there. The path therefore only contains /bin:/sbin:/usr/ bin:/usr/sbin, if I recall correctly. You can remedy that in a number of ways, none of them very satisfactory.
One is to define the $PATH variable in TextMate, under Preferences -> Advanced -> Shell Variables. This is not too terrible an idea IMHO, and easy to revert if it causes problems. You might need to occasionally update it if things change though.
The other is to edit the file ~/.MacOSX/environment.plist, which is a file containing a list of environment variables you want all GUI apps to be able to use. I have appended how mine looks like atm, as an example. You need to log out and back in for the effects to take place (which is its main disadvantage). Keep in mind, unless I am mistaken "~" doesn't have its special meaning here. Not sure about $HOME.
Haris
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CVS_RSH</key> <string>ssh</string> <key>SSH_AUTH_SOCK</key> <string>/tmp/501/SSHKeychain.socket</string> <key>PATH</key> <string>/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/teTeX/bin/powerpc- apple-darwin-current:/usr/local/bin</string> </dict> </plist>