I want to create a log the commands I create in all the termimals I work in, as explained in this question, Is there some utility or plugin which includes the current directory in the bash history?, and in which others have created their own alternatives, eg https://spin.atomicobject.com/2016/05/28/log-bash-history/ and https://github.com/rcaloras/bashhub-client.
I use tmux and session to organize my work, by using session names and window names. It is possible for them to set shell variables that can be used by the
PROMPT_COMMAND to update the history, namely use the session and window names to create an environment variables in said log. I need to be able to set them at will and switch them on or off as necessary.