Update .bashrc

bash history: increased HIST SIZE, remove duplicates and append history across multiple terminals
This commit is contained in:
Marco Grifantini 2021-01-24 09:57:43 +01:00
parent ce13fa5499
commit f8892c099e

View file

@ -12,15 +12,18 @@ export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
HISTCONTROL=ignoredups:erasedups
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTSIZE=10000
HISTFILESIZE=2000
# After each command, append to the history file and reread it
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize