JanDeDobbeleer / oh-my-posh

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

Spaces in the prompt only the first time in WSL #1066

Closed Bouchet07 closed 3 years ago

Bouchet07 commented 3 years ago

Code of Conduct

What happened?

When I installed oh-my-posh in windows, in powershell works fine, but I have ubuntu with WSL and when ~/.bashrc loads, the first time the prompt shows, it shows with spaces in between, and when I press enter, then loads normally
image

I added eval "$(oh-my-posh-wsl --init --shell bash --config (and my theme))" to ~/.bashrc , and i did . ~/.bashrc What should I do?

By the way if I enter ubuntu from powershell the first time loads fine image

Version

5.8.0

Theme


  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        {
          "type": "os",
          "style": "diamond",
          "foreground": "#ffffff",
          "background": "#3A86FF",
          "leading_diamond": "\uE0B6"
        },
        {
          "type": "path",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#ffffff",
          "background": "#ff479c",
          "properties": {
            "prefix": " \uE5FF ",
            "style": "folder"
          }
        },
        {
          "type": "git",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#193549",
          "background": "#fffb38",
          "properties": {
            "display_stash_count": true,
            "display_upstream_icon": true
          }
        },
        {
          "type": "node",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#ffffff",
          "background": "#6CA35E",
          "properties": {
            "prefix": " \uE718 "
          }
        },
        {
          "type": "root",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#193549",
          "background": "#ffff66"
        },
        {
          "type": "python",
          "style": "powerline",
          "powerline_symbol": "",
          "foreground": "#ffffff",
          "background": "#3A86FF",
          "properties": {
            "prefix": " \uE235 ",
            "display_version": false,
            "display_mode": "environment",
            "home_enabled": true,
            "display_virtual_env": true
          }
        },
        {
          "type": "exit",
          "style": "diamond",
          "foreground": "#ffffff",
          "background": "#2e9599",
          "leading_diamond": "",
          "trailing_diamond": "\uE0B4",
          "properties": {
            "display_exit_code": false,
            "always_enabled": true,
            "error_color": "#f1184c",
            "color_background": true,
            "prefix": " \uFC0C"
          }
        }
      ]
    }
  ],
  "final_space": true
}

### What OS are you seeing the problem on?

Windows

### Which shell are you using?

bash

### Relevant log output

_No response_
JanDeDobbeleer commented 3 years ago

@Bouchet07 this is a bug in Windows Terminal. See this FAQ item for more information.

github-actions[bot] commented 7 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.