How to edit path variable in ZSH

后端 未结 3 748
悲&欢浪女
悲&欢浪女 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:34

    You can put

     setopt shwordsplit
    

    in your .zshrc. Then zsh will perform world splitting like all Bourne shells do. That the default appears to be noshwordsplit is a misfeature that causes many a head scratching. I'd be surprised if it wasn't a FAQ. Lets see... yup: http://zsh.sourceforge.net/FAQ/zshfaq03.html#l18 3.1: Why does $var where var="foo bar" not do what I expect?

提交回复
热议问题