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.
I found the base script somewhere on GitHub. It looks like a good basis
to transform it into a true bluetooth interface which could be launched
directly from demnu. To that end I wrote a little '.desktop' file to add
it to `dmenu-desktop` entries.
I don't want my pager to clobber my terminal once I'm done looking at
whatever I was looking at.
This also means that I can remove its definition from the `batman`
script.
This was shamelessly stolen from the `bat-extras` repository, with a
little modification to call the pager with my wanted default options.
This obviously depends on the `bat` utility.