Custom terminal config for better history

To have shared history between sessions in terminal I use this settings so that history is appended to each new window I open

export HISTTIMEFORMAT="%d/%m/%y %T "
export HISTCONTROL=ignoredups:erasedups  # no duplicate entries
export HISTSIZE=100000                   # big big history
export HISTFILESIZE=100000               # big big history
shopt -s histappend
PROMPT_COMMAND="history -w"

put this into your .bash_profile and source it.