From b726f201bc7f36bf3c25e148e4e58ff821cb3af0 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Mon, 4 Mar 2019 12:34:21 -0800 Subject: [PATCH] Use `command` for direnv hook --- bash/direnv-hook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/direnv-hook b/bash/direnv-hook index 38a118b..5960ace 100644 --- a/bash/direnv-hook +++ b/bash/direnv-hook @@ -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