Enable support for direnv/direnv in interactive Zshells

This commit is contained in:
Danielle McLean 2018-12-19 13:34:46 +11:00
parent e7224f763d
commit 4ca6bb9316
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240

View file

@ -0,0 +1,8 @@
#! zsh
_direnv_hook() {
eval "$(direnv export zsh)"
}
typeset -ag precmd_functions
if (( $+commands[direnv] )) && [[ -z ${precmd_functions[(r)_direnv_hook]} ]]; then
precmd_functions+=(_direnv_hook)
fi