summaryrefslogtreecommitdiff
path: root/.config/bash/rc.d/10_hist.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/bash/rc.d/10_hist.sh')
-rw-r--r--.config/bash/rc.d/10_hist.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/bash/rc.d/10_hist.sh b/.config/bash/rc.d/10_hist.sh
new file mode 100644
index 0000000..d7c6bfc
--- /dev/null
+++ b/.config/bash/rc.d/10_hist.sh
@@ -0,0 +1,9 @@
+#!/hint/bash
+
+# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
+HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
+HISTFILE=${XDG_CACHE_HOME}/bash/history
+HISTTIMEFORMAT='[%Y-%m-%d %H:%M] '
+HISTSIZE=5000
+shopt -s histappend # append to the history file, don't overwrite it
+mkdir -p "${HISTFILE%/*}"