summaryrefslogtreecommitdiff
path: root/.config/bash/rc.d/10_hist.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-08-22 03:51:52 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-22 15:27:18 -0400
commit1ae109d7abae11a327f362bfdfb623ac0ac770e0 (patch)
tree5bf25f17077d4477c4a18a401081493076a8c28a /.config/bash/rc.d/10_hist.sh
parentef71eedb6bcc3889128af24df3aa668dde3e2c6f (diff)
Clean up bash configuration, and bash-emacs integration
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%/*}"