Apply direnv if available to load env-vars on demand from .envrc files

Reference: https://direnv.net/
This commit is contained in:
2025-09-29 03:18:23 +02:00
parent 79aeeaf8a9
commit c6896587c9

View File

@@ -62,6 +62,9 @@ which zoxide > /dev/null && eval "$(zoxide init --cmd cd bash)"
# setup fzf to use it e.g. for Ctrl+r
which fzf > /dev/null && fzf --bash > /dev/null && eval "$(fzf --bash)"
# load and unload env-variables dynamically from ".envrc" files
which direnv > /dev/null && eval "$(direnv hook bash)"
# standard alias
alias z=cd
alias cz='(pushd $(git rev-parse --show-toplevel); $(which cz); popd)'