Skip to content

Instantly share code, notes, and snippets.

@wwarriner
Created July 14, 2023 16:23
Show Gist options
  • Save wwarriner/8b0e3186af129989709fdc4f7980d7f4 to your computer and use it in GitHub Desktop.
Save wwarriner/8b0e3186af129989709fdc4f7980d7f4 to your computer and use it in GitHub Desktop.
History improvements for .bashrc
# History extensions
shopt -s histappend
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=1000
export HISTFILESIZE=100000
export HISTTIMEFORMAT='%F %T ' # Include history time stamps
# Save and reload the history after each command finishes
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment