GNU Info

Info Node: (screen.info)Dynamic Titles

(screen.info)Dynamic Titles


Next: Title Prompts Prev: Title Command Up: Naming Windows
Enter node , (file) or (file)node

Dynamic Titles
--------------

   `screen' has a shell-specific heuristic that is enabled by setting
the window's name to SEARCH|NAME and arranging to have a null title
escape-sequence output as a part of your prompt.  The SEARCH portion
specifies an end-of-prompt search string, while the NAME portion
specifies the default shell name for the window.  If the NAME ends in a
`:' `screen' will add what it believes to be the current command
running in the window to the end of the specified name (e.g. NAME:CMD).
Otherwise the current command name supersedes the shell name while it
is running.

   Here's how it works: you must modify your shell prompt to output a
null title-escape-sequence (<ESC> k <ESC> \) as a part of your prompt.
The last part of your prompt must be the same as the string you
specified for the SEARCH portion of the title.  Once this is set up,
`screen' will use the title-escape-sequence to clear the previous
command name and get ready for the next command.  Then, when a newline
is received from the shell, a search is made for the end of the prompt.
If found, it will grab the first word after the matched string and use
it as the command name.  If the command name begins with `!', `%', or
`^', `screen' will use the first word on the following line (if found)
in preference to the just-found name.  This helps csh users get more
accurate titles when using job control or history recall commands.


automatically generated by info2www version 1.2.2.9