summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMehdi Sadeghi <mehdi@mehdix.org>2021-06-07 09:53:44 +0200
committerMehdi Sadeghi <mehdi@mehdix.org>2021-06-07 09:53:44 +0200
commit566072896f894e8e49e84bf15781ed6727baf0c2 (patch)
treea8120d379220319919d305e089ae80cafbc7b7fc
parent1939e4ac00da652e2c86f67ab3140ba9bd8cf5b9 (diff)
Move direnv hook to bashrc.
-rw-r--r--.bashrc12
-rw-r--r--.config/blue032.profile11
2 files changed, 12 insertions, 11 deletions
diff --git a/.bashrc b/.bashrc
index 5d15aa2..40db5eb 100644
--- a/.bashrc
+++ b/.bashrc
@@ -17,3 +17,15 @@ complete -D -F _completion_loader -o bashdefault -o default
# Load if available
[ -f ~/.fzf.bash ] && . ~/.fzf.bash
[ -f ~/.config/broot/launcher/bash/br ] && . ~/.config/broot/launcher/bash/br
+
+# direnv hook
+_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
diff --git a/.config/blue032.profile b/.config/blue032.profile
index b759bfd..e69de29 100644
--- a/.config/blue032.profile
+++ b/.config/blue032.profile
@@ -1,11 +0,0 @@
-
-_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