dot-files/bash/direnv-hook
2019-03-04 12:34:21 -08:00

12 lines
235 B
Bash

#!/usr/bin/env bash
_direnv_hook() {
eval "$(direnv export bash)";
};
if [[ -x $(command -v direnv) ]]; then
if ! [[ "$PROMPT_COMMAND" =~ _direnv_hook ]]; then
PROMPT_COMMAND="_direnv_hook;$PROMPT_COMMAND";
fi
fi