From 0a55c10f6435d7355b20a25026d8745b8cd0009c Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Fri, 25 Mar 2016 12:04:05 -0400 Subject: [PATCH] keep bash history forever --- .bashrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index b4cc8c0..7159445 100644 --- a/.bashrc +++ b/.bashrc @@ -6,12 +6,16 @@ export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups # ... or force ignoredups and ignorespace export HISTCONTROL=ignoreboth +# never truncate bash history file +export HISTFILESIZE= +export HISTSIZE= +export HISTTIMEFORMAT="[%F %T] " +# always write a history line +export PROMPT_COMMAND="history -a; $PROMPT_COMMAND" # append to the history file, don't overwrite it shopt -s histappend -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) - # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize