diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-14 18:46:00 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-14 18:46:00 +1200 |
commit | e18577ed46eb1bfefeaa5feef085c787bab5cf5f (patch) | |
tree | f963f3a5faa098c0b2f1e539dfa857a62db2edae /bash/bashrc | |
parent | Use PROMPT_DIRTRIM if available (diff) | |
download | dotfiles-e18577ed46eb1bfefeaa5feef085c787bab5cf5f.tar.gz dotfiles-e18577ed46eb1bfefeaa5feef085c787bab5cf5f.zip |
Don't limit history if using Bash >=4.3
<http://wiki.bash-hackers.org/scripting/bashchanges>
Diffstat (limited to 'bash/bashrc')
-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 |