Area-UserInterfaceHelp WantedIssue-FeatureProduct-Terminal
Metriche repository
- Star
- (35.764 star)
- Metriche merge PR
- (Merge medio 27g 19h) (24 PR mergiate in 30 g)
Descrizione
The user should be able to embed certain terminal-specific variables in their custom title, that will be updated at runtime.
Something like:
{
"title":"{numberOfPanes} - Powershell"
}
Would then include the number of panes in the tab title text we display, like so:
5 - Powershell
- What syntax do we chose for these custom variables?
- What variables should we include?
- We should probably avoid any that'd be better served by a shell setting the title
- #2396 We should be able to conditionally put "Administrator" in the title
- #13241 - similarly, with the shield emoji
- #18890 - the window name
- Do we need to register change event handlers for each variable that they've put in the title? How do we handle that?
- Should we enable conditional elements in the string? e.g.
"{isAdmin?\"Admin\":\"\"} - {title}"to get "Admin - cmd.exe"- Another example -
"{name} [{numberOfPanes<10?numberOfPanes : \"9+\"}]"for "Powershell [2]" or "Powershell [9+]" - Another example - how would we get "Powershell" for 1 pane, but then "Powershell [+1]" for 2 panes? How would we encode the entire
[+{numberOfPanes}]bit should be conditional on there being more than one pane? Could we combine this with the above case, and have nested conditionals?- Does all of this basically mean embedding an entire scripting language into the tabTitle?
- Another example -
- Request: "Tab title" text resolves environment variables #10144
- #9929, #13506
This is obviously related to #608, but this is certainly out of scope for v1.0. #608 is just setting a simple title string to override the terminal's, this is setting a dynamic title.
Something we probably need to comport with #4183
Are we setting the title per-pane or per window? That affects how we structure the variables