1

I want to change the tab title of Powershell tabs in Windows Terminal because I think they must be slightly wrong or at least a bit confusing.

If I'm deep in a folder structure, it shows something like this:

C:\...\Roaming\Microsoft

Which is good. However, if I'm not deep in a folder structure, like say in the users directory, it shows this:

C:\...\C:\Users

Which makes no sense, as "C:\Users" is not a sub-folder of C:\. Where exactly is this algorithm, or setting, stored, so that I can attempt to fix it? Or is this a bug in some script so I can report it to Microsoft?

1 Answer 1

2

This is caused by some add-in that you have installed.

By default the title is only the name of the shell, for example "Windows PowerShell".

Changing the title is described in the Microsoft article Tutorial: Configure tab titles in Windows Terminal.

For PowerShell, the command used is:

$Host.UI.RawUI.WindowTitle = "New Title"

For example:

enter image description here

You need to find which software you have installed is changing the tab title. This can even be a clever prompt that you have defined.

2
  • I have Oh-My-Posh, must be it that messes it up then. Mar 19, 2021 at 12:33
  • Gah, I updated oh-my-posh and it broke everything. It was the culprit though. Mar 19, 2021 at 13:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .