diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-13 16:43:33 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-13 16:43:33 +1300 |
commit | f83c4aee2e2cb286e9e2fcb601b222f2132e321d (patch) | |
tree | d398ff02f83233db64e1a22098437876258542f7 /bash | |
parent | Separate .vimrc and .gvimrc Makefile targets (diff) | |
download | dotfiles-f83c4aee2e2cb286e9e2fcb601b222f2132e321d.tar.gz dotfiles-f83c4aee2e2cb286e9e2fcb601b222f2132e321d.zip |
Switch HISTFILESIZE for Bash >= 4.3 versions
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bash/bashrc b/bash/bashrc index af509614..45837f6b 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -8,8 +8,14 @@ if [[ $- != *i* ]] ; then return fi -# Keep around a million lines of history in file -HISTFILESIZE=$((2 ** 20)) +# If Bash >= 4.3, keep all history in file forever +if ((BASH_VERSINFO[0] >= 4 && BASH_VERSINFO[1] >= 3)) ; then + HISTFILESIZE=-1 + +# Otherwise, just keep a lot (a million lines) +else + HISTFILESIZE=$((2 ** 20)) +fi # Keep around a thousand lines of history in memory HISTSIZE=$((2 ** 10)) |