zsh 如何对单独的文件夹设置 环境变量?


zshrc已经设置了变量,比如 a = b , 如果在别的文件夹单独设置环境变量a,有什么好的做法?

zsh shell

nicdone 10 years, 8 months ago

请用这个吧。

direnv

direnv is an environment variable manager for your shell. It knows how to hook into bash, zsh and fish shell to load or unload environment variables depending on your current directory

https://github.com/zimbatm/direnv

Eliotte answered 10 years, 8 months ago

Your Answer