HISTIGNORE='exit:history:l:l[1als]:lla:+(.)'
HISTCONTROL='ignoreboth'
shopt -s cmdhist
shopt -s lithist
HISTTIMEFORMAT='%F %T '
PROMPT_COMMAND="history -a; history -c; history -r${PROMPT_COMMAND:+$'\n'"$PROMPT_COMMAND"}"
- Q&A with nice overview of multi-line commands: https://unix.stackexchange.com/a/353407/118235