简体   繁体   中英

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.

direnv uses only bash to evaluate your .envrc file. It then exports the changes back to your original shell. You'll have to rewrite your .envrc in bash .

Also check out direnv stdlib for the utility functions that direnv gives you access to from within any .envrc file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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