- Window title: "My Title" (early return, wins completely)
- Tab title: ProfileName (job) — user@host:~/path (OSC 2 is completely ignored)
If an app uses \e]0;My Title\a (OSC 0, sets both window and tab title):
- Window title: "My Title" (from windowName)
- Tab title with components: My Title (job) — user@host:~/path (combines)
- Tab title with components=0: "My Title" (pure app control)
The control sequence \e]2;...\a works for the window title but not the tab title. Use \e]0;...\a or \e]1;...\a to affect the tab. That title gets combined with other components specified in the profile’s title setting. But you can disable them all, at which point only the control sequence-provided tab title will be used. Here’s how it looks when they are all disabled:
Note that the title shows as “Shell”, which is the fallback string if no control sequence has set a title.
I hope that clears it up! It is more complicated than I'd like in part for backward compatibility and in part to accommodate widely varying preferences.