diff options
-rw-r--r-- | bash/bashrc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bash/bashrc b/bash/bashrc index 80ce5f8c..8951a2ee 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -3,9 +3,14 @@ if [[ $- != *i* ]]; then return fi -# Keep plenty of history -HISTFILESIZE=1000000 -HISTSIZE=1000000 +# Keep plenty of history; unlimited, if we have >=4.3 +if ((${BASH_VERSINFO[0]} >= 4 && ${BASH_VERSINFO[1]} >= 3)); then + HISTFILESIZE=-1 + HISTSIZE=-1 +else + HISTFILESIZE=1000000 + HISTSIZE=1000000 +fi # Ignore duplicate commands and whitespace in history HISTCONTROL=ignoreboth |