JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.01k stars 2.37k forks source link

Windows Terminal Tab Title not set to Path since upgrading from V2 to V3 #911

Closed KiLLeRRaT closed 3 years ago

KiLLeRRaT commented 3 years ago

Code of Conduct

What happened?

The current path used to be displayed in the Title bar in Windows Terminal. I'm not 100% sure, but I'm pretty sure that it's due to me upgrading from OMP V2 to V3.

Before: image

After: image

Version

3.175.0

Theme

Paradox

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Relevant log output

No response

lnu commented 3 years ago

The console title is not set by default with Paradox. You can customize the theme by exporting it and updating the console title properties.

example of paradox with custom console title template:

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        {
          "type": "root",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#100e23",
          "background": "#ffe9aa"
        },
        {
          "type": "session",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#100e23",
          "background": "#ffffff"
        },
        {
          "type": "path",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#100e23",
          "background": "#91ddff",
          "properties": {
            "folder_icon": "\uF115",
            "folder_separator_icon": " \uE0B1 ",
            "style": "full"
          }
        },
        {
          "type": "git",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#193549",
          "background": "#95ffa4"
        },
        {
          "type": "python",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#100e23",
          "background": "#906cff",
          "properties": {
            "prefix": " \uE235 "
          }
        },
        {
          "type": "exit",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#ffffff",
          "background": "#ff8080",
          "properties": {
            "prefix": " \uE20F"
          }
        }
      ]
    },
    {
      "type": "prompt",
      "alignment": "left",
      "newline": true,
      "segments": [
        {
          "type": "text",
          "style": "plain",
          "foreground": "#007ACC",
          "properties": {
            "prefix": "",
            "text": "\u276F"
          }
        }
      ]
    }
  ],
  "final_space": false,
  "console_title": true,
  "console_title_template": "{{ .Shell }} in {{ .Folder }}",
  "console_title_style": "template"
}
KiLLeRRaT commented 3 years ago

Hi @JanDeDobbeleer thanks for getting back. That is great. I've updaetd my theme, and it works a treat for pwsh.exe.

I did notive it not working for normal powershell.exe, and cmd.exe

Is there another trick to that?

If, I can definitely live with it because for probably 85% of the time I'm in pwsh.exe

Cheers!

image

JanDeDobbeleer commented 3 years ago

@KiLLeRRaT with not working do you mean the title? That should work everywhere as it's a terminal feature, not a shell one. About prompt support, Powershell 5 is supported (though the profile is at a different location) and for CMD there's a possibility with clink, but not officially documented.

KiLLeRRaT commented 3 years ago

Righto, gotcha! I used to have omp installed in PowerShell 5 also. I will configure that separately. As for CMD, it's weird that it doesn't display the path in the titlebar, but that isn't omp's fault!

Thanks for helping out and the speedy reply.

ps. I can't believe I did not find/see the console_xxxx config in the documentation. I've now found it and read it. Sorry to have wasted a bit of time!

Cheers and have a good one!

JanDeDobbeleer commented 3 years ago

@KiLLeRRaT all good! Happy to help. Any question can be the path towards something better, in this case maybe documentation.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.