[zsh] initialize direnv as recommended by p10k

This commit is contained in:
odrling 2024-03-02 13:51:20 +01:00
parent d80944edd8
commit f4f6240ce3
No known key found for this signature in database
GPG key ID: E24CA7508C27AF5B

3
.zshrc
View file

@ -1,4 +1,5 @@
stty -ixon # Disable ctrl-s and ctrl-q.
(( ${+commands[direnv]} )) && emulate zsh -c "$(direnv export zsh)"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
@ -26,7 +27,7 @@ if command -v fzf >/dev/null; then
bindkey '^I' $fzf_default_completion
fi
command -v direnv 2>&1 > /dev/null && source <(direnv hook zsh)
(( ${+commands[direnv]} )) && emulate zsh -c "$(direnv export zsh)"
function osc7-pwd() {
emulate -L zsh # also sets localoptions for us