Closed yekanchi closed 2 years ago
@yekanchi the latest version of Powershell has a change in colors. See here for more information. This is not an issue with oh-my-posh.
@yekanchi also see this issue for more information.
i'm using windows terminal, and tried set $PSStyle.OutputRendering="ANSI"
and $env:TERM="xterm"
but it does not work.
it works fine in vsCode terminal
but in the windows-terminal
it shows not colors. even the $PSStyle
command output has no colors. so it seems it's a windows terminal issue or pwsh issue.
but why the oh-my-posh
command show's the correct output colors?
@yekanchi there's probably a difference in how Powershell renders ANSI in standardout vs prompt. That's a separate function so there might be additional logic. I would open an issue at pwsh, I'm curious to understand what's exactly causing it.
Now that I think about it, is your PSReadline version up to date?
@yekanchi there's probably a difference in how Powershell renders ANSI in standardout vs prompt. That's a separate function so there might be additional logic. I would open an issue at pwsh, I'm curious to understand what's exactly causing it.
Now that I think about it, is your PSReadline version up to date?
My PSReadline Version is 2.2 beta4
update: on vsCode these two lines:
$env:TERM="xterm"
$PSStyle.OutputRendering=2;
added to the pwsh
profile fixes the issue for the vsCode terminal, but very the same shell and profile(pwsh) does not show colors in windows terminal
or cmd.exe terminal
@yekanchi works perfectly for me on 7.2.1 (Windows 11) with the following setting:
$PSStyle.OutputRendering=Host
$env:TERM isn't set. I can't reproduce this, and it's for sure an issue with your env. can you go and ask our friends at Powershell what needs to be done?
@yekanchi I had a similar issue #2963 Solution: Removing System Environment Variable "Term : dumb" resolved my issue.
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.
Code of Conduct
What happened?
while oh-my-posh works fine in powershell 6 on my pc, i encounterd a problem with latest pwsh in two of my computers that it's like it have some problem with colors in all of the themes.
reproduce steps:
install-module oh-my-posh
, closepwsh
and re-open it.import-module oh-my-posh
and run:oh-my-posh --init --shell pwsh --config ~/jandedobbeleer.omp.json | Invoke-Expression
FiraCode NF
font)but when run
oh-my-posh
it works for a single line as expected:Theme
default
What OS are you seeing the problem on?
Windows
Which shell are you using?
No response
Log output