Enable support for direnv/direnv in interactive Zshells
This commit is contained in:
parent
e7224f763d
commit
4ca6bb9316
1 changed files with 8 additions and 0 deletions
8
config/zsh/interactive/direnv
Normal file
8
config/zsh/interactive/direnv
Normal 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
|
Loading…
Reference in a new issue