Neal,
I just realized that, although one approach is to unset the
PROMPT_COMMAND variable, another approach is to use the "screen" command
of "defdynamictitle off" in my "~/.screenrc" file. With this setting,
the content of the PROMPT_COMMAND variable does not have an effect when
opening *new* screen-window.
For a previously opened screen-window, the related "screen" command of
"dynamictitle off" lets you to turn off dynamic changes to the title of
the screen-window.
-- Steve Ross
On 5/19/2020 4:06 PM, Steve Ross wrote:
Neal,
Thanks, thanks, thanks!
You wrote:
I googled your prompt command, it is probably your system default.
My "/etc/bashrc" looks to be exactly the same one as in the book that
you referenced. That explains the particular content of PROMPT_COMMAND.
You wrote:
...it is the culprit and recommends "unset PROMPT_COMMAND" ...
I stumbled upon unsetting PROMPT_COMMAND when I looked at another
system where the window titles persist... and I noticed that that
system does not have PROMPT_COMMAND set. I confirmed that unsetting
that shell variable on my current system does the trick.
(I've referred to the manual page for "screen" many times, but somehow
I missed the section that explains the "title-string escape-sequence"
and the "title-escape-sequence".)
Thanks again,
-- Steve Ross