[FEATURE] Add OSC 0 setting of title whenever the session name is set/changes
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
The terminal tab name (or in tmux or the like) is just basically the command that was run. It'd be very helpful to see the session name that I set, in order to more quickly/easily see which session is which in which tab.
Proposed Solution
Emit an ASNI OSC 0 (title + icon) whenever the session name is set/changed.
References:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
https://en.wikipedia.org/wiki/ANSI_escape_code#OSC
Alternative Solutions
Working around by setting via a UserPromptSubmit, on every single prompt submission. It's wasteful and unnecessary, and NOT built-in, which means not everybody can enjoy this functionality.
Priority
High - Significant impact on productivity
Feature Category
Interactive mode (TUI)
Use Case Example
Helps me identify which session for which terminal window, or tmux tab is which.
Also will help screen-readers and the like (accessibility!) since they now have a good title to operate off of for tabs and such, as well as for voice in/out usage.
Additional Context
Opening this AGAIN, since there was never any reply on the original, and so was autoclosed.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗