@
kittyoung GuanYuzhesMBP:~ GuanYuzhe$ set|grep his
HISTFILE=/Users/GuanYuzhe/.bash_sessions/8A86197D-6AEC-4434-AA70-287C19347466.historynew
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHELL_SESSION_HISTFILE=/Users/GuanYuzhe/.bash_sessions/8A86197D-6AEC-4434-AA70-287C19347466.history
SHELL_SESSION_HISTFILE_NEW=/Users/GuanYuzhe/.bash_sessions/8A86197D-6AEC-4434-AA70-287C19347466.historynew
SHELL_SESSION_HISTFILE_SHARED=/Users/GuanYuzhe/.bash_history
shell_session_history_allowed ()
if shopt -q histappend; then
shell_session_history_check ()
if shell_session_history_allowed; then
shell_session_history_enable;
if [ "$PROMPT_COMMAND" = "shell_session_history_check" ]; then
if [[ $PROMPT_COMMAND =~ (.*)(; *shell_session_history_check *| *shell_session_history_check *; *)(.*) ]]; then
shell_session_history_enable ()
shell_session_history_allowed && shell_session_save_history;
shell_session_save_history ()
shell_session_history_enable;
history -a;
echo -ne '\n...copying shared history...';
echo -ne '\n...saving history...';
echo -n 'truncating history files...';