Fix bash history

From www.ReeltoReel.nl Wiki
Revision as of 20:09, 26 January 2022 by Pvdm (talk | contribs) (Created page with "put in .bashrc or bash.bashrc.local <pre> # fix bash history export HISTCONTROL=ignoredups:erasedups # no duplicate entries export HISTSIZE=100000 # big big...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

put in .bashrc or bash.bashrc.local

# fix bash history
export HISTCONTROL=ignoredups:erasedups  # no duplicate entries
export HISTSIZE=100000                   # big big history
export HISTFILESIZE=100000               # big big history
shopt -s histappend                      # append to history, don't overwrite it

# Save and reload the history after each command finishes
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
# end fix bash