Use `command` for direnv hook

main
Buddy Sandidge 6 years ago
parent 0828796aff
commit b726f201bc

@ -4,7 +4,7 @@ _direnv_hook() {
eval "$(direnv export bash)";
};
if type direnv > /dev/null; then
if [[ -x $(command -v direnv) ]]; then
if ! [[ "$PROMPT_COMMAND" =~ _direnv_hook ]]; then
PROMPT_COMMAND="_direnv_hook;$PROMPT_COMMAND";
fi

Loading…
Cancel
Save