Unable to overwrite custom tabTitle from within shell #3351

Closed
opened 2026-01-30 23:19:19 +00:00 by claunia · 4 comments
Owner

Originally created by @jantari on GitHub (Aug 11, 2019).

Environment

Windows build number: 10.0.18956.1000
Windows Terminal version (if applicable): 0.3.2171.0

Any other software? No other software relevant I believe

Steps to reproduce

  1. Configure a custom tabTitle for cmd or PowerShell shells in the profiles.json file, e.g.:
[...]
"tabTitle" : "Windows PowerShell",
[...]
  1. Open a cmd or PowerShell tab, verify the customized tabTitle is appearing.
  2. Try to set a custom title programmatically from within the shell, e.g. in PowerShell:
$Host.UI.RawUI.WindowTitle = 'Custom Title :)'
# OR
[Console]::Title = 'Custom Title 2 :)'

or in command prompt:

TITLE Custom Title :)

Expected behavior

We should be able to programmatically overwrite the customized tabTitle set in the profiles.json file - programmatically setting the tab title DOES work when no custom tabTitle is specified in profiles.json.

I believe the order of precedence should be, from lowest to highest:

  1. Default title / executable path
  2. Gets overwritten by tabTitle property in profiles.json
  3. Gets overwritten by scripts or programs setting their own titles

Actual behavior

When a customized tabTitle is specified, it cannot be overwriten or changed from within the shell.

Originally created by @jantari on GitHub (Aug 11, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18956.1000 Windows Terminal version (if applicable): 0.3.2171.0 Any other software? No other software relevant I believe ``` # Steps to reproduce 1. Configure a custom `tabTitle` for cmd or PowerShell shells in the profiles.json file, e.g.: ``` [...] "tabTitle" : "Windows PowerShell", [...] ``` 2. Open a cmd or PowerShell tab, verify the customized `tabTitle` is appearing. 3. Try to set a custom title programmatically from within the shell, e.g. in PowerShell: ```powershell $Host.UI.RawUI.WindowTitle = 'Custom Title :)' # OR [Console]::Title = 'Custom Title 2 :)' ``` or in command prompt: ```batch TITLE Custom Title :) ``` # Expected behavior We should be able to programmatically overwrite the customized `tabTitle` set in the profiles.json file - programmatically setting the tab title DOES work when no custom `tabTitle` is specified in profiles.json. I believe the order of precedence should be, from lowest to highest: 1. Default title / executable path 2. Gets overwritten by `tabTitle` property in profiles.json 3. Gets overwritten by scripts or programs setting their own titles # Actual behavior When a customized `tabTitle` is specified, it cannot be overwriten or changed from within the shell.
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-30 23:19:19 +00:00
Author
Owner

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

tabTitle is an override. If you don’t want the title to be overridden, don’t use it. If you’re already planning on using the shell to set the title, you do not need tabTitle. 😄

There is an open pull request that offers another better option for titling.

@DHowett-MSFT commented on GitHub (Aug 11, 2019): tabTitle is an override. If you don’t want the title to be overridden, don’t use it. If you’re already planning on using the shell to set the title, _you do not need tabTitle._ :smile: There is an open pull request that offers another better option for titling.
Author
Owner

@jantari commented on GitHub (Aug 11, 2019):

I disagree.

I would say tabTitle is a customization preference that's used to have something nicer than a filesystem path by default.

However, the applications running within the shell have better context awareness than the hosting Terminal application - and command-line applications commonly set their own "window" titles,
so this should take precedence. I must re-state that I feel this is a bug.

Cosnider this:

When I have not customized my tabTitle and I start vim from a command prompt, my tab title is changed to [Unnamed] - VIM, as the application author intended. This information is also VERY helpful to me the user, as I can now tell my VIM tab apart from my other command prompt tabs.

With a custom tabTitle set, this feature is completely taken away.

You say tabTitle is an override, but it shouldn't be. It should be a default value, modifyable at any point by any application.

Please consider re-opening the issue, or introducing a defaultTabTitle property that is not a hard override.

@jantari commented on GitHub (Aug 11, 2019): I disagree. I would say `tabTitle` is a customization preference that's used to have something nicer than a filesystem path by default. However, the applications running within the shell have better context awareness than the hosting Terminal application - and command-line applications commonly set their own "window" titles, so this should take precedence. I must re-state that I feel this is a bug. Cosnider this: When I have not customized my `tabTitle` and I start `vim` from a command prompt, my tab title is changed to `[Unnamed] - VIM`, as the application author intended. This information is also VERY helpful to me the user, as I can now tell my VIM tab apart from my other command prompt tabs. With a custom `tabTitle` set, this feature is completely taken away. You say `tabTitle` is an override, but it shouldn't be. It should be a default value, modifyable at any point by any application. Please consider re-opening the issue, or introducing a `defaultTabTitle` property that is not a hard override.
Author
Owner

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

You should follow #2373. There are a few issues littering this repository explaining why things are the way they are, and why 2373 is the correct fix. That should ameliorate most of your concerns here.

@DHowett-MSFT commented on GitHub (Aug 11, 2019): You should follow #2373. There are a few issues littering this repository explaining why things are the way they are, and why 2373 is the correct fix. That should ameliorate most of your concerns here.
Author
Owner

@jantari commented on GitHub (Aug 12, 2019):

Thanks, I had since found that issue after you illuded to an open PR regarding this.

I will follow it, and it is completely fine to close this as "duplicate / close enough duplicate",
it was just your original statement that tabTitle should be a set-in-stone, static, non-context-aware override that I took issue with. And as I saw now, I'm not alone.

cheers

@jantari commented on GitHub (Aug 12, 2019): Thanks, I had since found that issue after you illuded to an open PR regarding this. I will follow it, and it is completely fine to close this as "duplicate / close enough duplicate", it was just your original statement that `tabTitle` should be a set-in-stone, static, non-context-aware override that I took issue with. And as I saw now, I'm not alone. cheers
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3351