Skip to content

Instantly share code, notes, and snippets.

@orian
Created August 20, 2014 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orian/ce4e93c46f7f5c9e943e to your computer and use it in GitHub Desktop.
Save orian/ce4e93c46f7f5c9e943e to your computer and use it in GitHub Desktop.
sharing bash command history between multiple windows
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=20000
HISTFILESIZE=50000
export PROMPT_COMMAND="history -a; history -n"
export HISTIGNORE="ls:l:exit:cd:history:ll"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment