Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When shell_integration is set to true a key needs to be pressed before prompt is shown in Windows Terminal Preview in powershell #4945

Closed
1 task done
waldimen opened this issue May 20, 2024 · 3 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@waldimen
Copy link

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

I am using oh-my-posh in windows terminal preview integrated with Power Shell Core (pwsh). I have "shell_integration": true, in my config file. After updating Windows Terminal to Version 1.21.1272.0 I need to press additional key to see the prompt after last command.
For example after using clear command the terminal is completely black.
Pressing any key shows the prompt again.
It does not matter which theme is used, the problem appears when shell_integration is set to true.

I am not sure if this is problem with oh-my-posh or rather Windows Terminal itself.

Theme

amro

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

#

Segments:

ConsoleTitle(false)                       -   0 ms
Session(true)                             -   0 ms
Path(true)                                -   2 ms
Git(false)                                -  16 ms
Root(false)                               -   0 ms
Text(true)                                -   0 ms

Run duration: 24.1082ms

Cache path: C:\Users\test\AppData\Local\oh-my-posh

Config path: G:\scoop\apps\oh-my-posh\current\themes\amro.omp.json

Logs:

[DEBUG] 12:49:13.119 shell.go:Getenv:325 → NO DATA
[TRACE] 12:49:13.120 shell.go:Getenv(TERM_PROGRAM) - 553.9µs
[DEBUG] 12:49:13.120 shell.go:Getenv:325 → C:\Users\test\AppData\Local
[TRACE] 12:49:13.120 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 12:49:13.120 shell_windows.go:CachePath() - 0s
[DEBUG] 12:49:13.120 shell.go:Getenv:325 → G:\scoop\apps\oh-my-posh\current\themes\amro.omp.json
[TRACE] 12:49:13.120 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 12:49:13.120 shell.go:Shell:593 → no shell name provided in flags, trying to detect it
[DEBUG] 12:49:13.126 shell.go:Shell:601 → process name: oh-my-posh.exe
[TRACE] 12:49:13.126 shell.go:Shell() - 5.8199ms
[TRACE] 12:49:13.126 shell.go:resolveConfigPath() - 5.8199ms
[TRACE] 12:49:13.126 shell.go:Init() - 6.3738ms
[TRACE] 12:49:13.126 shell.go:Flags() - 0s
[TRACE] 12:49:13.126 config.go:loadConfig() - 527.7µs
[TRACE] 12:49:13.126 shell.go:Flags() - 0s
[TRACE] 12:49:13.126 shell.go:Shell() - 0s
[DEBUG] 12:49:13.126 shell.go:Getenv:325 → NO DATA
[TRACE] 12:49:13.126 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 12:49:13.126 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.126 shell_windows.go:WindowsRegistryKeyValue:217 → ColorizationColor(DWORD): 0x005A3E1B
[TRACE] 12:49:13.126 shell.go:Shell() - 0s
[DEBUG] 12:49:13.126 shell.go:Getenv:325 → 7.4.2
[TRACE] 12:49:13.126 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 12:49:13.126 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 12:49:13.126 text.go:Render:70 → Rendering template:
[TRACE] 12:49:13.126 shell.go:StatusCodes() - 0s
[TRACE] 12:49:13.126 shell.go:Flags() - 0s
[DEBUG] 12:49:13.126 shell.go:Getenv:325 → 1
[TRACE] 12:49:13.126 shell.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 12:49:13.126 shell.go:Getenv:325 → 1
[TRACE] 12:49:13.126 shell.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 12:49:13.126 shell.go:Flags() - 0s
[TRACE] 12:49:13.126 shell.go:Flags() - 0s
[TRACE] 12:49:13.126 shell.go:Shell() - 0s
[TRACE] 12:49:13.126 shell.go:Shell() - 0s
[TRACE] 12:49:13.126 shell.go:Flags() - 0s
[TRACE] 12:49:13.126 shell.go:Flags() - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.126 shell.go:Pwd:355 → C:\Users\test
[TRACE] 12:49:13.126 shell.go:Flags() - 0s
[TRACE] 12:49:13.126 shell.go:Pwd() - 0s
[DEBUG] 12:49:13.126 shell_windows.go:58 → C:\Users\test
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.126 segment.go:SetEnabled:535 → Segment: Session
[TRACE] 12:49:13.126 shell.go:Pwd() - 0s
[TRACE] 12:49:13.126 shell.go:Pwd() - 0s
[DEBUG] 12:49:13.126 shell.go:Getenv:325 → NO DATA
[DEBUG] 12:49:13.126 shell_windows.go:58 → C:\Users\test
[TRACE] 12:49:13.126 shell.go:Getenv(SSH_CONNECTION) - 0s
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.126 shell_windows.go:58 → C:\Users\test
[DEBUG] 12:49:13.126 shell.go:Getenv:325 → NO DATA
[DEBUG] 12:49:13.126 segment.go:SetEnabled:535 → Segment: Git
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[TRACE] 12:49:13.126 shell.go:Getenv(SSH_CLIENT) - 0s
[DEBUG] 12:49:13.126 segment.go:SetEnabled:535 → Segment: Path
[TRACE] 12:49:13.126 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.126 shell.go:Getenv:325 → C:\Users\test\AppData\Local
[TRACE] 12:49:13.126 shell.go:Pwd() - 0s
[TRACE] 12:49:13.126 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 12:49:13.126 shell.go:Shell() - 0s
[TRACE] 12:49:13.126 shell.go:Shell() - 0s
[TRACE] 12:49:13.126 shell_windows.go:Root() - 0s
[TRACE] 12:49:13.126 shell.go:Shell() - 0s
[TRACE] 12:49:13.126 shell.go:StatusCodes() - 0s
[TRACE] 12:49:13.126 shell_windows.go:IsWsl() - 0s
[DEBUG] 12:49:13.126 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 12:49:13.127 properties.go:GetString:28 → 
[DEBUG] 12:49:13.127 properties.go:GetString:28 → 
[DEBUG] 12:49:13.127 shell_windows.go:58 → C:\Users\test
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.127 properties.go:GetString:28 → ~
[DEBUG] 12:49:13.127 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 12:49:13.127 shell.go:PathSeparator() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.127 shell.go:TemplateCache:774 → 
[TRACE] 12:49:13.127 shell.go:Pwd() - 0s
[DEBUG] 12:49:13.127 shell_windows.go:58 → C:\Users\test
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.127 shell.go:User:493 → test
[TRACE] 12:49:13.127 shell.go:User() - 0s
[DEBUG] 12:49:13.127 shell.go:Host:505 → TESTDESKTOP2
[TRACE] 12:49:13.127 shell.go:Host() - 0s
[TRACE] 12:49:13.127 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.127 shell.go:Getenv:325 → NO DATA
[TRACE] 12:49:13.127 shell.go:Getenv(SHLVL) - 0s
[TRACE] 12:49:13.127 shell.go:TemplateCache() - 525.5µs
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:PathSeparator() - 0s
[TRACE] 12:49:13.128 shell.go:PathSeparator() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:PathSeparator() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:PathSeparator() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:GOOS() - 0s
[TRACE] 12:49:13.128 shell.go:PathSeparator() - 0s
[DEBUG] 12:49:13.128 properties.go:GetString:28 → NO DATA
[DEBUG] 12:49:13.128 shell_windows.go:58 → C:\Users\test
[TRACE] 12:49:13.128 shell.go:PathSeparator() - 0s
[TRACE] 12:49:13.128 shell.go:Pwd() - 0s
[TRACE] 12:49:13.128 shell_windows.go:IsWsl() - 0s
[TRACE] 12:49:13.128 shell.go:StackCount() - 0s
[DEBUG] 12:49:13.128 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 12:49:13.128 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 12:49:13.128 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 12:49:13.128 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 12:49:13.128 shell_windows.go:DirIsWritable() - 517.6µs
[TRACE] 12:49:13.128 shell.go:TemplateCache() - 0s
[DEBUG] 12:49:13.142 shell.go:CommandPath:545 → g:\scoop\shims\git.exe
[TRACE] 12:49:13.142 shell.go:CommandPath(git.exe) - 16.1624ms
[TRACE] 12:49:13.143 shell.go:HasCommand(git.exe) - 16.1624ms
[TRACE] 12:49:13.143 shell.go:Pwd() - 0s
[ERROR] 12:49:13.143 shell.go:HasParentFilePath:689 → CreateFile .git: The system cannot find the file specified.
[TRACE] 12:49:13.143 shell.go:HasParentFilePath(.git) - 0s
[DEBUG] 12:49:13.143 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 12:49:13.143 text.go:Render:70 → Rendering template:  {{ .UserName }} on
[DEBUG] 12:49:13.143 text.go:Render:70 → Rendering template:   {{ .Path }}
[TRACE] 12:49:13.143 shell.go:TemplateCache() - 0s
[TRACE] 12:49:13.143 shell.go:TemplateCache() - 0s
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[DEBUG] 12:49:13.143 text.go:Render:70 → Rendering template: plain
[DEBUG] 12:49:13.143 text.go:Render:70 → Rendering template: plain
[DEBUG] 12:49:13.143 text.go:Render:70 → Rendering template: plain
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[TRACE] 12:49:13.143 shell.go:Flags() - 0s
[TRACE] 12:49:13.143 shell.go:Pwd() - 0s
[TRACE] 12:49:13.143 shell.go:Flags() - 0s
[DEBUG] 12:49:13.143 shell_windows.go:58 → C:\Users\test
[TRACE] 12:49:13.143 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.143 segment.go:SetEnabled:535 → Segment: Text
[TRACE] 12:49:13.143 shell.go:Pwd() - 0s
[TRACE] 12:49:13.143 shell.go:TemplateCache() - 0s
[DEBUG] 12:49:13.143 shell_windows.go:58 → C:\Users\test
[TRACE] 12:49:13.143 shell.go:GOOS() - 0s
[DEBUG] 12:49:13.143 segment.go:SetEnabled:535 → Segment: Root
[TRACE] 12:49:13.143 shell_windows.go:Root() - 0s
[DEBUG] 12:49:13.143 text.go:Render:70 → Rendering template: #
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[DEBUG] 12:49:13.143 shell.go:Getenv:325 → NO DATA
[TRACE] 12:49:13.143 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 12:49:13.143 text.go:Render:70 → Rendering template: plain
[DEBUG] 12:49:13.143 text.go:Render:70 → Rendering template: plain
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[TRACE] 12:49:13.143 shell.go:Shell() - 0s
[DEBUG] 12:49:13.143 shell.go:Getenv:325 → C:\Users\test\AppData\Local
[TRACE] 12:49:13.143 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 12:49:13.143 shell_windows.go:CachePath() - 0s
[TRACE] 12:49:13.143 shell.go:Flags() - 0s
@waldimen waldimen added the 🐛 bug Something isn't working label May 20, 2024
@JanDeDobbeleer
Copy link
Owner

@waldimen we didn't change anything on our end in this regard, received one other mention of this so I'll check it out.

@JanDeDobbeleer
Copy link
Owner

@waldimen I tried to reproduce this but I can't. It works every time. I'm not saying it doesn't happen, but I would file a bug at Windows Terminal and ask for guidance there. If needed, with more context, we can reopen this one and provide a solution but I can't reproduce this at the moment.

@waldimen
Copy link
Author

@JanDeDobbeleer thanks for trying. I was able to reproduce it on my second machine. For now I disabled shell_integration but I am going to spend some time on diagnosing it when I have some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants