zsh/config/zsh/interactive/direnv

8 lines
204 B
Bash

#! 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