I'm running Ubuntu 18.04. This is a new installation.
When I issue the command direnv allow in a directory with a.envrc file, nothing happens:
โ ts git:(master) โ ls .envrc
.envrc
โ ts git:(master) โ direnv allow .
โ ts git:(master) โ cat .envrc
export FOO=foo
โ ts git:(master) โ echo $FOO
โ ts git:(master) โ
When there is no .envrc file, it complains though:
โ Projects ls .envrc
ls: cannot access '.envrc': No such file or directory
โ Projects direnv allow .
direnv: error .envrc file not found
I've install direnv from apt-get and added the following line to .zshrc:
# direnv
eval "$(direnv hook bash)"
New installation. install from apt-get and follow instructions
direnv version:v2.15.0Well, it works with bash but not zsh... even if I have do the eval "manually", nothing happens when i get in the directory or type direnv allow.
@coulonxyz the hook is shell-specific, so it should be eval "$(direnv hook zsh)" bash => zsh
@coulonxyz, it is also explained in this section.
oh my. What an idiot. Thanks a lot.
it happens to the best of us :)
Most helpful comment
@coulonxyz the hook is shell-specific, so it should be
eval "$(direnv hook zsh)"bash => zsh