c8e600f39779c6d2ef75b40304b5391a541c41df
- Author
- Thomas Luzat <thomas@luzat.com>
- Committer
- Carlo Sala <carlosalag@protonmail.com>
- Date
Message
fix(direnv): initialize properly direnv
Closes #12038
Closes #12039
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
Diff
1diff --git a/plugins/direnv/direnv.plugin.zsh b/plugins/direnv/direnv.plugin.zsh
2index 6f8debb62d50d160588e76c6c117fb8029ddf8d7..0a33194ddf315a4f8036d1a946f5de35cfd60d7b 100644
3--- a/plugins/direnv/direnv.plugin.zsh
4+++ b/plugins/direnv/direnv.plugin.zsh
5@@ -3,14 +3,14 @@ command -v direnv &>/dev/null || return
6
7 _direnv_hook() {
8 trap -- '' SIGINT;
9- eval "$(direnv hook zsh)";
10+ eval "$(direnv export zsh)";
11 trap - SIGINT;
12 }
13 typeset -ag precmd_functions;
14-if [[ -z ${precmd_functions[(r)_direnv_hook]} ]]; then
15+if [[ -z "${precmd_functions[(r)_direnv_hook]+1}" ]]; then
16 precmd_functions=( _direnv_hook ${precmd_functions[@]} )
17 fi
18 typeset -ag chpwd_functions;
19-if [[ -z ${chpwd_functions[(r)_direnv_hook]} ]]; then
20+if [[ -z "${chpwd_functions[(r)_direnv_hook]+1}" ]]; then
21 chpwd_functions=( _direnv_hook ${chpwd_functions[@]} )
22 fi