====== Bash history settings ====== export HISTTIMEFORMAT='%F %T ' export HISTSIZE=3000 # number of lines stored in memory export HISTFILESIZE=10000 # max number of lines in ~/.bash_history file ## Try to fix history problems (seems OK in ~/.bashrc. Also here?) ## Based on http://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows#48113 export HISTCONTROL=ignoreboth shopt -s histappend shopt -s cmdhist # multi-line commands in one line # Save and reload the history after each command finishes export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" {{tag>public bash linux}}