From d91bd8454d96aec1948bbc0808418aa0f92f5246 Mon Sep 17 00:00:00 2001 From: Mehdi Sadeghi Date: Thu, 27 May 2021 10:26:23 +0200 Subject: Add bash direnv hook for blue032. --- .config/blue032.profile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .config/blue032.profile (limited to '.config/blue032.profile') diff --git a/.config/blue032.profile b/.config/blue032.profile new file mode 100644 index 0000000..b759bfd --- /dev/null +++ b/.config/blue032.profile @@ -0,0 +1,11 @@ + +_direnv_hook() { + local previous_exit_status=$?; + trap -- '' SIGINT; + eval "$("/usr/bin/direnv" export bash)"; + trap - SIGINT; + return $previous_exit_status; +}; +if ! [[ "${PROMPT_COMMAND:-}" =~ _direnv_hook ]]; then + PROMPT_COMMAND="_direnv_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}" +fi -- cgit v1.2.3