It seems like the idiomatic way to update $PROMPT_COMMAND is to use
variable expansion to add a semi-colon and a space before the command
we're adding.
I also switched from prepending my commands to appending them, which
allows overriding behaviour, such as terminal titles which could be set
from system files.
This little script will look at your current working directory and its
parent directories to source local configuration files (very useful for
Python projects, or the way I build TC with a local PATH pre-pended).
It works relatively well but still is a very fragile solution that
depends on the order in which the shell has sourced its files. Because
the Termite script kept erasing the previous PROMPT_COMMAND value for
Bash I had to change to source it at the beginning of my configuration
file.