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

$PATH shuffle

Expand Messages
  • Matt Southerden
    Hi, I ve searched the group and found lots of threads about paths, most of which centre around not having the path set, and resulting in setting the run in
    Message 1 of 5 , Dec 21, 2009
      Hi,

      I've searched the group and found lots of threads about paths, most of
      which centre around not having the path set, and resulting in setting
      the 'run in login shell' preference.

      I do have my path set using this method, but I am getting the path
      jumbled up into a different order. All of the the items in my path are
      the same if I echo $PATH from vim or the shell, but the order is
      different.

      (in fact, my whole 'env' is the same for both, apart from the vars vim
      adds)

      Any ideas why this may be?

      Thanks.
      Matt. :)

      --
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • björn
      ... I don t really understand these issues very well...but I just checked on my end and what I do is to modify $PATH inside ~/.profile like this export
      Message 2 of 5 , Dec 23, 2009
        2009/12/21 Matt Southerden:
        > I've searched the group and found lots of threads about paths, most of
        > which centre around not having the path set, and resulting in setting
        > the 'run in login shell' preference.
        >
        > I do have my path set using this method, but I am getting the path
        > jumbled up into a different order. All of the the items in my path are
        > the same if I echo $PATH from vim or the shell, but the order is
        > different.
        >
        > (in fact, my whole 'env' is the same for both, apart from the vars vim
        > adds)
        >
        > Any ideas why this may be?

        I don't really understand these issues very well...but I just checked
        on my end and what I do is to modify $PATH inside ~/.profile like this

        export PATH=/usr/local/sbin:/usr/local/bin:~/bin:$PATH

        When I do ":echo $PATH" in MacVim those paths are added twice (once at
        the beginning and once at the end of the PATH). Weird.

        Does anybody else know why this might be?

        Björn

        --
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Edward Marczak
        ... I *don t* see this behavior. I essentially do the same as you: build up the PATH variable in my .bash_profile. Are you setting this anyplace else? Do you
        Message 3 of 5 , Dec 23, 2009
          On Wed, Dec 23, 2009 at 12:09 PM, björn <bjorn.winckler@...> wrote:
          > 2009/12/21 Matt Southerden:
          >> I've searched the group and found lots of threads about paths, most of
          >> which centre around not having the path set, and resulting in setting
          >> the 'run in login shell' preference.
          >>
          >> I do have my path set using this method, but I am getting the path
          >> jumbled up into a different order. All of the the items in my path are
          >> the same if I echo $PATH from vim or the shell, but the order is
          >> different.
          >>
          >> (in fact, my whole 'env' is the same for both, apart from the vars vim
          >> adds)
          >>
          >> Any ideas why this may be?
          >
          > I don't really understand these issues very well...but I just checked
          > on my end and what I do is to modify $PATH inside ~/.profile like this
          >
          > export PATH=/usr/local/sbin:/usr/local/bin:~/bin:$PATH
          >
          > When I do ":echo $PATH" in MacVim those paths are added twice (once at
          > the beginning and once at the end of the PATH).  Weird.
          >
          > Does anybody else know why this might be?

          I *don't* see this behavior. I essentially do the same as you: build
          up the PATH variable in my .bash_profile.

          Are you setting this anyplace else? Do you see the same doubling
          effect if you just echo $PATH in a shell? Or is it only in MacVim?
          --
          Ed Marczak
          e: marczak@...
          w: http://www.radiotope.com/writing

          --
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
        • David Patrick Henderson
          ... In [Snow] Leopard, Apple started using a utility called path_helper to generate system paths. It reads a file /etc/paths and a list of files in
          Message 4 of 5 , Dec 24, 2009
            On 23 Dec 2009, at 18:39, Edward Marczak wrote:

            > I *don't* see this behavior. I essentially do the same as you: build
            > up the PATH variable in my .bash_profile.
            >
            > Are you setting this anyplace else? Do you see the same doubling
            > effect if you just echo $PATH in a shell? Or is it only in MacVim?

            In [Snow] Leopard, Apple started using a utility called path_helper to generate system paths. It reads a file /etc/paths and a list of files in /etc/paths.d/ which set the system path in $PATH. /usr/local/bin is listed by default in etc/paths after other the other binary paths. This may be the cause of the behavior you are seeing since your profile adds /usr/local/bin to the front and keeps it at the back.

            Dave
            --
            "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." -- C. A. R. "Tony" Hoare

            --
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
          • björn
            ... I just tried again and now it is not happening anymore (tried starting MacVim both from Finder and Terminal to see if that made any difference). When it
            Message 5 of 5 , Dec 24, 2009
              2009/12/24 Edward Marczak:
              > On Wed, Dec 23, 2009 at 12:09 PM, björn wrote:
              >> 2009/12/21 Matt Southerden:
              >>> I've searched the group and found lots of threads about paths, most of
              >>> which centre around not having the path set, and resulting in setting
              >>> the 'run in login shell' preference.
              >>>
              >>> I do have my path set using this method, but I am getting the path
              >>> jumbled up into a different order. All of the the items in my path are
              >>> the same if I echo $PATH from vim or the shell, but the order is
              >>> different.
              >>>
              >>> (in fact, my whole 'env' is the same for both, apart from the vars vim
              >>> adds)
              >>>
              >>> Any ideas why this may be?
              >>
              >> I don't really understand these issues very well...but I just checked
              >> on my end and what I do is to modify $PATH inside ~/.profile like this
              >>
              >> export PATH=/usr/local/sbin:/usr/local/bin:~/bin:$PATH
              >>
              >> When I do ":echo $PATH" in MacVim those paths are added twice (once at
              >> the beginning and once at the end of the PATH).  Weird.
              >>
              >> Does anybody else know why this might be?
              >
              > I *don't* see this behavior. I essentially do the same as you: build
              > up the PATH variable in my .bash_profile.
              >
              > Are you setting this anyplace else?  Do you see the same doubling
              > effect if you just echo $PATH in a shell? Or is it only in MacVim?

              I just tried again and now it is not happening anymore (tried starting
              MacVim both from Finder and Terminal to see if that made any
              difference). When it did happen it was only in MacVim that the path
              got "duplicated" (not in Terminal).

              At any rate, I've never experienced any problems as a result of the
              path being set incorrectly...I was just testing to see if I could
              repro the OP's problems. Maybe we can all keep an eye out to see if
              there actually is a reproducible problem lurking here somewhere.

              Björn

              --
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
            Your message has been successfully submitted and would be delivered to recipients shortly.