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

"ransparentm" appear before prompt in custom theme #1116

Closed GuyBritish closed 3 years ago

GuyBritish commented 3 years ago

Code of Conduct

What happened?

I installed the new oh-my-posh update for Powershell 7 and had some trouble using my old custom theme for Windows Powershell.

Windows PowerShell after update:

image

Powershell 7: There's also a boolean being returned (not sure if it's because of oh-my-posh), but it appears in all themes

image

Version

5.14.0

Theme

{ "$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", "properties": { "display_host": false } }, { "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", "properties": { "display_status": true } }, { "type": "python", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#100e23", "background": "#906cff", "properties": { "prefix": " \uE235 ", "display_mode": "context" } }, { "type": "exit", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#ffffff", "background": "#ff8080", "properties": { "prefix": " \uE20F" } } ] }, { "type": "prompt", "alignment": "left", "newline": true, "segments": [ { "type": "executiontime", "style": "diamond", "trailing_diamond": "\uE0B4 ", "leading_diamond": "\uE0B6", "foreground": "#AEA4BF", "background": "#29315A", "properties": { "threshold": 150, "style": "austin", "prefix": "", "postfix": "" } }, { "type": "text", "style": "diamond", "trailing_diamond": "\uE0B4", "leading_diamond": "\uE0B6", "foreground": "#7FD5EA", "background": "#29315A", "properties": { "prefix": "", "text": "\u276F", "postfix": "" } }, { "type":"text", "style": "plain", "foreground": "transparent", "properties": { "prefix": "", "text": " ", "postfix": "" } } ] } ], "final_space": false }

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

remove the last "foreground": "transparent", in the text segment and it will work.
For the False appearing before, not sure it's related to oh-my-posh

GuyBritish commented 3 years ago

Thank you! That fixed it. I figured out the False as well, it came from my profile script to init conda.

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.