]> git.phdru.name Git - dotfiles.git/commitdiff
.bashrc: `unset HISTFILE` if it was unset before
authorOleg Broytman <phd@phdru.name>
Sat, 8 Oct 2022 10:20:45 +0000 (13:20 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 8 Oct 2022 10:20:45 +0000 (13:20 +0300)
.bashrc

diff --git a/.bashrc b/.bashrc
index f1614c8cc87f611affab941799080df18c507c77..14eeaec3b31bc792485a9d2d22d7137ce7c70704 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -25,6 +25,12 @@ esac
 
 . "$HOME"/.shellrc
 
+if [ "$HISTFILE" = "$HOME/.bash_history" ]; then
+    # This is the default value set by interactive bash
+    # when the global value was unset. Unset it here too.
+    unset HISTFILE
+fi
+
 # append to the history file, don't overwrite it
 shopt -s histappend