Closed heaths closed 1 year ago
To note, a secondary_prompt
does not show the initial background color from the first cell e.g.,
secondary_prompt:
background: transparent
template: "<p:white,p:gray> </><p:gray,transparent></> "
Shows:
Before filing this, I experimented with a few variations and figured it might just be how VT100 sequences are supported, but that this works with the secondary_prompt
makes me wonder if there is something that, perhaps, could be done to resolve this issue.
@heaths I'll check if we properly restore the colors. Although I don't think we have a different implementation for transient and secondary.
@heaths I have a similar config for my transient prompt and I can't reproduce this at all on macOS using iTerm2. Does this happen for bash as well or only PowerShell?
EDIT: sam for PowerShell Windows, works.
Interesting. It only happens on pwsh in Ubuntu under WSL2. Running in bare Windows it works just fine:
There's nothing in my PSReadLine options that would account for this, but clearly I have some more digging to do.
@heaths is your PSReadLine up-to-date there?
Oddly enough, though I have pwsh 7.3.1 in both places that ships with PSReadline 2.2.6, my Windows module is still 2.2.2 (where this works). I did upgrade to 2.2.6 (turns out 2.2.2 was installed per-user) and it works fine.
Given this works on Windows, I'll investigate further why it doesn't work as expected under WSL2. Almost definitely not a problem with OMP, though. I will comment back here if I find otherwise, but that's highly doubtful. Thanks for the pointers!
FWIW, whatever is causing this does appear to be using the color of the first cell in that line:
(Posting here in case someone else runs into this and has some ideas)
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?
In pwsh on Ubuntu 22.04 in WSL2 using Windows Terminal, if I don't use a character that shows part of the terminal profile's background, the rest of the line shows the initial background color. For example,
...shows what I'd expect:
However, if the initial cell on that line is not showing the background color of the terminal profile, the rest of the line uses the background color I initial set in the template:
Theme
Custom, using the
transient_prompt
shown above as well as a few variations, like a Powerline font uses an "arrow" char that shows the terminal profile background initially.What OS are you seeing the problem on?
Windows, Linux
Which shell are you using?
bash, powershell
Log output