Feature Request: Allow tab title to be set by console apps #3091

Closed
opened 2026-01-30 23:12:50 +00:00 by claunia · 5 comments
Owner

Originally created by @mbreaton on GitHub (Aug 3, 2019).

Add support for console apps that attempt to set their window title:

cmd => title "Title"
pwsh => $host.ui.RawUI.WindowTitle = "title"
bash => export PS1=

This works in current shells and is useful for allowing long running scripts to display a current action message before executing a block of long running commands that emit a lot of superfluous console output (compiler output, file copies, etc) and would reduce switching back and forth to a tab just to view its progress

$host.ui.RawUI.WindowTitle = "compile..."
# build command
$host.ui.RawUI.WindowTitle = "containerize..."
# docker build
$host.ui.RawUI.WindowTitle = "deploy..."
# docker push
Originally created by @mbreaton on GitHub (Aug 3, 2019). ### Add support for console apps that attempt to set their window title: **cmd** => `title "Title"` **pwsh** => `$host.ui.RawUI.WindowTitle = "title"` **bash** => `export PS1=` This works in current shells and is useful for allowing long running scripts to display a current action message before executing a block of long running commands that emit a lot of superfluous console output (compiler output, file copies, etc) and would reduce switching back and forth to a tab just to view its progress ``` $host.ui.RawUI.WindowTitle = "compile..." # build command $host.ui.RawUI.WindowTitle = "containerize..." # docker build $host.ui.RawUI.WindowTitle = "deploy..." # docker push ```
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-30 23:12:50 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 3, 2019):

... have you tried this? It works.

@DHowett-MSFT commented on GitHub (Aug 3, 2019): ... have you tried this? It works.
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 3, 2019):

If you are setting a tabTitle that will, by design, override whatever the shell says.

@DHowett-MSFT commented on GitHub (Aug 3, 2019): If you are setting a `tabTitle` that will, by design, override whatever the shell says.
Author
Owner

@mbreaton commented on GitHub (Aug 3, 2019):

Yes, I have tabTitle set. Would it not make more sense to be able to override that via running scripts?

@mbreaton commented on GitHub (Aug 3, 2019): Yes, I have tabTitle set. Would it not make more sense to be able to override that via running scripts?
Author
Owner

@zadjii-msft commented on GitHub (Aug 5, 2019):

See, the problem with that is the path that you're already seeing without setting tabTitle is a title that's emitted by the shell. So you can't really have it both ways, where the tabTitle overrides the thing set by the shell, and the shell is able to override the tabTitle.

@zadjii-msft commented on GitHub (Aug 5, 2019): See, the problem with that is the path that you're already seeing without setting `tabTitle` is a title that's emitted by the shell. So you can't really have it both ways, where the `tabTitle` overrides the thing set by the shell, and the shell is able to override the `tabTitle`.
Author
Owner

@mbreaton commented on GitHub (Aug 5, 2019):

Understood, thanks for the clarification

@mbreaton commented on GitHub (Aug 5, 2019): Understood, thanks for the clarification
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3091