简体   繁体   English

为什么 direnv 无法读取我的 zsh/fish/elvish/tcsh 脚本?

[英]Why is direnv failing to read my zsh/fish/elvish/tcsh script?

When attempting to evaluate a .envrc file I get the error " emulate: command not found " or " cd: -q: invalid option " or any number of various possible errors in my completely valid zsh / fish / elivsh / tcsh script.尝试评估.envrc文件时,我在完全有效的zsh / fish / elivsh / tcsh脚本中收到错误“emulate emulate: command not found ”或“ cd: -q: invalid option ”或任何数量的各种可能错误。

direnv uses only bash to evaluate your .envrc file. direnv仅使用bash来评估您的.envrc文件。 It then exports the changes back to your original shell.然后它将更改导出回您的原始 shell。 You'll have to rewrite your .envrc in bash .您必须在bash .envrc

Also check out direnv stdlib for the utility functions that direnv gives you access to from within any .envrc file.还可以查看direnv stdlibdirenv允许您从任何.envrc文件中访问的实用程序函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM