12 lines
235 B
Bash
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
|