Skip to content

Instantly share code, notes, and snippets.

@joaquinco
Last active November 26, 2024 12:44
Show Gist options
  • Save joaquinco/3502bd582e1875e299fff46c5e482559 to your computer and use it in GitHub Desktop.
Save joaquinco/3502bd582e1875e299fff46c5e482559 to your computer and use it in GitHub Desktop.
Bash History configuration
# Lines of history in memory
export HISTSIZE=10000
# Lines of history to disk
export HISTFILESIZE=2000000
export HISTCONTROL=ignoreboth
export HISTIGNORE=history
export HISTTIMEFORMAT='%F %T '
# Append history instead of overwrite
shopt -s histappend
# Inmediatly append
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