Closed YDX-2147483647 closed 1 year ago
@YDX-2147483647 I'm certain this is a PowerShell only problem so I'll fix it there. I can't reproduce at all on macOS using any other shell.
Everything works fine now. Thanks!
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?
Background
v12.15.0 introduces
oh-my-posh toggle <type>
to hide or show a segment in a shell session.As explained in #3086 , the toggles are stored in the per-session cache, whose name contains the PID.
https://github.com/JanDeDobbeleer/oh-my-posh/blob/63bb1b4729e7aae0218101b46183bdd51084c928/src/platform/shell.go#L42
Issue
However, sometimes the PID of
oh-my-posh toggle <type>
,oh-my-posh get toggles
and the prompt can be different …↓ I
toggle <something>
in PID x, butget toggles
in PID y, and the prompt may render in PID z. (Windows, PowerShell 7, slim)↓ In the codespace, I rebuild it with
fmt.Println(platform.TOGGLECACHE)
insrc/cli/get.go
,src/cli/toggle.go
andsrc/engine/segment.go
. (bash, default theme)Theme
It's not the theme/config.
I have checked several themes (default, slim, zash on Windows + PowerShell 7) and tried in the codespace (default theme, bash). All of them behaves similarly.
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output