From e18577ed46eb1bfefeaa5feef085c787bab5cf5f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 14 Sep 2013 18:46:00 +1200 Subject: Don't limit history if using Bash >=4.3 --- bash/bashrc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bash') 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 -- cgit v1.2.3