News for hackers. Stuff that matters.
Re:Keeping bash history in sync between multiple terminals by joelthelion on Monday March 26, 2012 @01:59PM (#3757844)
This is how autojump does it:

    export PROMPT_COMMAND="$AUTOJUMP ; ${PROMPT_COMMAND:-:}"
Re:Keeping bash history in sync between multiple terminals by pavel_lishin on Monday March 26, 2012 @04:04PM (#3758391)
My bash-fu is weak; can you break that down for me?
Re:Keeping bash history in sync between multiple terminals by zakj on Monday March 26, 2012 @05:09PM (#3758657)
${VARIABLE:-value} expands to the contents of $VARIABLE, if it exists, or to "value" otherwise. In this case value is ":", a bash builtin that does nothing. Effectively, the above sets PROMPT_COMMAND to run the autojump command, then to run the pre-existing PROMPT_COMMAND, if any, or a no-op.