Only source direnv if it hasn't already been sourced
This commit is contained in:
parent
dda5fcc784
commit
d67b07d275
@ -163,5 +163,8 @@ prompt_command_prepend preserve_xtrace
|
|||||||
prompt_command_append preserve_xtrace_reset
|
prompt_command_append preserve_xtrace_reset
|
||||||
|
|
||||||
if $(which direnv &> /dev/null); then
|
if $(which direnv &> /dev/null); then
|
||||||
|
# Only if direnv isn't already defined in our prompt_command
|
||||||
|
if ! grep -q _direnv_hook <<< $PROMPT_COMMAND; then
|
||||||
eval "$(direnv hook bash)"
|
eval "$(direnv hook bash)"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user