修改~/.bashrc添加:
shopt -s histappend
#PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows
标签:none