Why does my vim command-line path differ from my shell PATH?

后端 未结 4 576
北恋
北恋 2021-02-08 02:37

e.g.,

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/bin:~/bin:/usr/local/Cellar/python3/3.2.3/bin

$ vim 
:! echo $PATH
/usr/bin:/bin         


        
4条回答
  •  深忆病人
    2021-02-08 03:15

    This is a known problem introduced by Apple in OS X 10.5 Leopard.

    If you are using Bash or Zsh and are using non-interactive shells, you are affected.

    Running sudo chmod ugo-x /usr/libexec/path_helper will fix you up, but you should take a look at the article to see why.

    From this SO answer

提交回复
热议问题