Skip to content

Instantly share code, notes, and snippets.

@arcticmatt
Last active January 12, 2020 21:51
Show Gist options
  • Save arcticmatt/adce11ff6fbf6755a590550250987c28 to your computer and use it in GitHub Desktop.
Save arcticmatt/adce11ff6fbf6755a590550250987c28 to your computer and use it in GitHub Desktop.
##### History stuff
# Avoid consecutive duplicates. See https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html
export HISTCONTROL=ignoredups
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend
# See https://unix.stackexchange.com/questions/18212/bash-history-ignoredups-and-erasedups-setting-conflict-with-common-history
export PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"
# Unlimited history size
export HISTFILESIZE=
export HISTSIZE=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment