2022-05-26 12:52:54 +00:00
|
|
|
export HISTCONTROL=ignoreboth: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
|
2022-09-29 22:29:13 +00:00
|
|
|
function _history_hook() {
|
|
|
|
history -a; history -c; history -r
|
|
|
|
}
|
|
|
|
export PROMPT_COMMAND="$( \
|
|
|
|
echo "$PROMPT_COMMAND" \
|
|
|
|
| sed 's/;\ *$//; s/; _history_hook//g' \
|
|
|
|
); _history_hook"
|
|
|
|
|