Weird behaviour with zsh PATH

前端 未结 2 1740
谎友^
谎友^ 2021-01-25 05:29

I just encourage a weird problem with zsh today.

My environment is Mac OS X Yosemite, zsh 5.0.5 (x86_64-apple-darwin14.0)

In .zshrc, I have manually set the PATH

2条回答
  •  后悔当初
    2021-01-25 06:09

    Try using $HOME instead of ~. In many situations, shells do not expand ~ when you expect them to and it is usually better to use $HOME. ~ is really only intended to be a short cut for interactive use. (The only case I can recall where ~ was preferred was in a .gitalias, where ~ was expanded and variables were not.)

提交回复
热议问题