Compare commits

..

No commits in common. "1bc2b49e3f64b4d36b939e3795ed18875f604b4c" and "17359d1fd035b058a7e50e5adfe67bf549bc1a1f" have entirely different histories.

2 changed files with 4 additions and 12 deletions

View file

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

View file

@ -1,7 +1,3 @@
# For accurate instant prompt from Powerlevel10k, we need to load up the
# correct environment from direnv first.
(( ${+commands[direnv]} )) && emulate zsh -c "$(direnv export zsh)"
# Enable Powerlevel10k instant prompt. Should stay close to the top of zshrc. # Enable Powerlevel10k instant prompt. Should stay close to the top of zshrc.
# Initialization code that may require console input (password prompts, [y/n] # Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below. # confirmations, etc.) must go above this block; everything else may go below.