Apply direnv if available to load env-vars on demand from .envrc files
Reference: https://direnv.net/
This commit is contained in:
3
.bashrc
3
.bashrc
@@ -62,6 +62,9 @@ which zoxide > /dev/null && eval "$(zoxide init --cmd cd bash)"
|
|||||||
# setup fzf to use it e.g. for Ctrl+r
|
# setup fzf to use it e.g. for Ctrl+r
|
||||||
which fzf > /dev/null && fzf --bash > /dev/null && eval "$(fzf --bash)"
|
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
|
# standard alias
|
||||||
alias z=cd
|
alias z=cd
|
||||||
alias cz='(pushd $(git rev-parse --show-toplevel); $(which cz); popd)'
|
alias cz='(pushd $(git rev-parse --show-toplevel); $(which cz); popd)'
|
||||||
|
|||||||
Reference in New Issue
Block a user