Loading ...
Sorry, an error occurred while loading the content.

Re: Mac Questions

Expand Messages
  • Benji Fisher
    ... The docs already explain one way to set $PATH. ... As it says there, the system vimrc files in the versions distributed at macvim.org/OSX already use this
    Message 1 of 9 , Feb 1, 2007
    • 0 Attachment
      On Tue, Jan 09, 2007 at 10:23:25AM +0100, Bram Moolenaar wrote:
      >
      > Dave Land wrote:
      >
      > > On Jan 8, 2007, at 3:03 PM, Dave Land wrote:
      > >
      > > > Happily, Apple provided a utility that handles it for you:
      > > >
      > > > defaults read "${HOME}/.MacOSX/environment"
      > >
      > > Actually, making this work in bash (or other shell) requires a little
      > > more than just reading the file... Here's the relevant chunk from
      > > my .bashrc:
      > >
      > > # Get environment variables from ~/.MacOSX/environment.plist
      > > # (This avoids the sin of duplicating data here and in that file)
      > > if [[ `uname` == 'Darwin' ]] ; then
      > > defaults read ~/.MacOSX/environment | grep -v '[{}]' | tr '"' "'" |
      > > awk '{ print "declare -x",$1"="$3 }' | while read -r OneLine; do eval
      > > $OneLine; done;
      > > fi
      > >
      > > To give credit where it's due, this came from a comment on
      > > macosxhints.com.
      > >
      > > The conditional (if [[ `uname` == "Darwin' ]]) is because I use this
      > > same .bashrc across several hosts, including Solaris, Linux, and Mac
      > > OS X.
      >
      > This issue comes up often enough that it deserves a section in the help.
      > Could you perhaps write some text? If you can send me a patch that
      > would be great.

      The docs already explain one way to set $PATH.

      :help mac-faq

      As it says there, the system vimrc files in the versions distributed at
      macvim.org/OSX already use this method. The same method should work for
      other environment variables ... but AFAIK the only one that matters is
      $PATH.

      HTH --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.