diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2016-09-24 14:20:10 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2016-09-24 15:08:29 +0800 |
commit | 368abd78d9d34aa9e422b8bdadb0e7bd90029923 (patch) | |
tree | 90836d16661effef1e8066a7633e7c78d3600e80 | |
parent | 30d00e414e7192869e64376a800e698e6a6e644f (diff) | |
download | configfile-368abd78d9d34aa9e422b8bdadb0e7bd90029923.tar.gz configfile-368abd78d9d34aa9e422b8bdadb0e7bd90029923.tar.zst configfile-368abd78d9d34aa9e422b8bdadb0e7bd90029923.zip |
bash_include: 避免在 bash 4.4 因為記憶體配置失敗而無法登入bash_include-20160924
-rw-r--r-- | bash_include | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bash_include b/bash_include index e4609c4..252bb00 100644 --- a/bash_include +++ b/bash_include @@ -119,8 +119,13 @@ nocolorprompting="${nocolorprompting}"'\$ ' colorsecondprompting="\[\e[36m\]-->\[\e[m\] " nocolorsecondprompting="--> " -HISTSIZE=2147483647 -HISTFILESIZE=2147483647 +if [ "${BASH_VERSINFO[0]}" -gt "5" ] || [ "${BASH_VERSINFO[0]}" -eq "4" -a "${BASH_VERSINFO[1]}" -eq "3" ]; then + HISTSIZE=-1 + HISTFILESIZE=-1 +else + HISTSIZE=2147483647 + HISTFILESIZE=2147483647 +fi HISTCONTROL=ignoredups:ignorespace HISTTIMEFORMAT="%F %T " historycountfile="$HOME/.bash_history.count" |