How to edit path variable in ZSH

后端 未结 3 810
悲&欢浪女
悲&欢浪女 2021-01-31 10:20

In my .bash_profile I have the following lines:

PATHDIRS=\"
/usr/local/mysql/bin
/usr/local/share/python
/opt/local/bin
/opt/local/sbin
$HOME/bin\"
for          


        
3条回答
  •  不要未来只要你来
    2021-01-31 10:42

    Still not sure what the problem was (maybe newlines in $PATHDIRS)? but changing to zsh array syntax fixed it:

    PATHDIRS=(
    /usr/local/mysql/bin
    /usr/local/share/python
    /usr/local/scala/scala-2.8.0.final/bin
    /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin
    /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin
    /opt/local/etc
    /opt/local/bin
    /opt/local/sbin
    $HOME/.gem/ruby/1.8/bin
    $HOME/bin)
    

    and

    path=($path $dir)
    

提交回复
热议问题