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

后端 未结 4 625
北恋
北恋 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:32

    I was not able to resolve this with zsh, and ended up using bash for my vim shell.

    Here's what I did:

    1. modified my .zshrc to work with bash
    2. ln -s .zshrc .bashrc
    3. added set shell=bash to my .vimrc file

    and now my vim command-line PATH is equal to my zsh shell PATH.

提交回复
热议问题