JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
16.89k stars 2.36k forks source link

Powershell 7.4\.5 will not render Nerd Fonts Glyphs correctly. #5665

Closed ChadThomsen closed 4 days ago

ChadThomsen commented 4 days ago

Code of Conduct

What happened?

A bug happened! Glyphs are rendered incorrectly for PowerShell 7.4. On the exact same machine they render correctly for PowerShell 5x

I have two different laptops. Both have the same Windows Build Number, Powershell Version Number, Oh My Posh Version Number. One works perfect, the other Powershell 7.4 does not render the Glyphs.

Theme

All themes have the same issue.

What OS are you seeing the problem on?

Windows

Which shell are you using?

No response

Log output

Notice the line below, and the last line start with the "funky characters" instead of the normal glyphs.

 ~  oh-my-posh debug powershell --plain

Version: 23.14.1

Shell: powershell (7.4.5)

Prompt:

 ~ 

Segments:

ConsoleTitle(true)                        -   1 ms
Path(true)                                -   2 ms

Run duration: 8.7595ms

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

Config path: C:\users\ThomseC\AppData\local\Programs\oh-my-posh\themes\hotstick.minimal.omp.json

Logs:

[DEBUG] 21:23:10.407 debug.go:49 → debug mode enabled
[DEBUG] 21:23:10.408 debug.go:49 → plain mode enabled
[DEBUG] 21:23:10.408 terminal.go:Getenv:164 → C:\Users\ThomseC\AppData\Local
[TRACE] 21:23:10.408 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 21:23:10.408 terminal.go:CachePath() - 61µs
[DEBUG] 21:23:10.408 terminal.go:70 → loading cache file: C:\Users\ThomseC\AppData\Local\oh-my-posh\omp.cache
[DEBUG] 21:23:10.408 terminal.go:70 → loading cache key: upgrade_check
[TRACE] 21:23:10.408 terminal.go(C:\Users\ThomseC\AppData\Local\oh-my-posh\omp.cache) - 0s
[DEBUG] 21:23:10.408 terminal.go:Getenv:164 → C:\Users\ThomseC\AppData\Local
[TRACE] 21:23:10.408 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 21:23:10.408 terminal.go:CachePath() - 0s
[DEBUG] 21:23:10.408 terminal.go:70 → loading cache file: C:\Users\ThomseC\AppData\Local\oh-my-posh\omp.cache.2728
[DEBUG] 21:23:10.409 terminal.go:70 → loading cache key: prompt_count_cache
[TRACE] 21:23:10.409 terminal.go(C:\Users\ThomseC\AppData\Local\oh-my-posh\omp.cache.2728) - 509.1µs
[TRACE] 21:23:10.409 terminal.go:setPromptCount() - 0s
[DEBUG] 21:23:10.409 terminal.go:Getenv:164 → C:\users\ThomseC\AppData\local\Programs\oh-my-posh\themes\hotstick.minimal.omp.json
[TRACE] 21:23:10.409 terminal.go:Getenv(POSH_THEME) - 0s
[DEBUG] 21:23:10.409 terminal.go:ResolveConfigPath:96 → config set using POSH_THEME: C:\users\ThomseC\AppData\local\Programs\oh-my-posh\themes\hotstick.minimal.omp.json
[TRACE] 21:23:10.409 terminal.go:ResolveConfigPath() - 0s
[TRACE] 21:23:10.409 terminal.go:Init() - 2.1529ms
[TRACE] 21:23:10.409 terminal.go:Flags() - 0s
[TRACE] 21:23:10.410 load.go:loadConfig() - 1.0925ms
[TRACE] 21:23:10.410 terminal.go:Flags() - 0s
[DEBUG] 21:23:10.410 debug.go:57 → terminal program: Windows Terminal
[DEBUG] 21:23:10.410 debug.go:57 → terminal shell: shell
[DEBUG] 21:23:10.410 terminal.go:Getenv:164 → NO DATA
[TRACE] 21:23:10.410 terminal.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 21:23:10.410 terminal_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.410 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.410 terminal_windows.go:WindowsRegistryKeyValue:215 → ColorizationColor(DWORD): 0xC4847545
[TRACE] 21:23:10.410 terminal.go:Shell() - 0s
[DEBUG] 21:23:10.410 terminal.go:Getenv:164 → 7.4.5
[TRACE] 21:23:10.410 terminal.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 21:23:10.410 debug.go:PrintDebug:23 → segment: Title
[DEBUG] 21:23:10.410 text.go:Render:80 → rendering template: {{.Folder}}{{if .Root}} :: root{{end}} :: {{.Shell}}
[TRACE] 21:23:10.410 terminal.go:Flags() - 0s
[TRACE] 21:23:10.411 terminal_windows.go:Root() - 0s
[TRACE] 21:23:10.411 terminal.go:Shell() - 0s
[TRACE] 21:23:10.411 terminal.go:StatusCodes() - 0s
[TRACE] 21:23:10.411 terminal_windows.go:IsWsl() - 0s
[DEBUG] 21:23:10.411 terminal.go:TemplateCache:651 → environment: [ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\ThomseC\AppData\Roaming CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=PXL-PW0BHLWT ComSpec=C:\WINDOWS\system32\cmd.exe CONDA_PROMPT_MODIFIER=False DriverData=C:\Windows\System32\Drivers\DriverData HOMEDRIVE=C: HOMEPATH=\Users\ThomseC LOCALAPPDATA=C:\Users\ThomseC\AppData\Local LOGONSERVER=\\PXL-PW0BHLWT NUMBER_OF_PROCESSORS=12 OneDrive=C:\Users\ThomseC\OneDrive - Parexel OneDriveCommercial=C:\Users\ThomseC\OneDrive - Parexel OS=Windows_NT Path=C:\Program Files\PowerShell\7;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Meta Networks\;C:\Program Files\PowerShell\7\;C:\Program Files\dotnet\;C:\Users\ThomseC\AppData\Local\Microsoft\WindowsApps;C:\Users\ThomseC\AppData\Local\Programs\Git\cmd;C:\Program Files\Terraform;;C:\Users\ThomseC\AppData\Local\Programs\oh-my-posh\bin;C:\Users\ThomseC\AppData\Local\Microsoft\WinGet\Packages\Kubernetes.kubectl_Microsoft.Winget.Source_8wekyb3d8bbwe;C:\Users\ThomseC\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\ThomseC\AppData\Local\Microsoft\WinGet\Packages\Terraform-docs.Terraform-docs_Microsoft.Winget.Source_8wekyb3d8bbwe; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL POSH_CURSOR_COLUMN=1 POSH_CURSOR_LINE=12 POSH_INSTALLER=winget POSH_PID=2728 POSH_SHELL_VERSION=7.4.5 POSH_THEME=C:\users\ThomseC\AppData\local\Programs\oh-my-posh\themes\hotstick.minimal.omp.json POSH_THEMES_PATH=C:\Users\ThomseC\AppData\Local\Programs\oh-my-posh\themes POWERLINE_COMMAND=oh-my-posh POWERSHELL_DISTRIBUTION_CHANNEL=MSI:Windows 10 Enterprise PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD PROCESSOR_LEVEL=25 PROCESSOR_REVISION=5000 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PSModulePath=C:\Users\ThomseC\OneDrive - Parexel\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\ThomseC\AppData\Local\Temp TMP=C:\Users\ThomseC\AppData\Local\Temp USERDNSDOMAIN=na.pxl.int USERDOMAIN=NA USERDOMAIN_ROAMINGPROFILE=NA USERNAME=ThomseC USERPROFILE=C:\Users\ThomseC windir=C:\WINDOWS WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID={574e775e-4f2a-5b96-ac1e-a2962a402336} WT_SESSION=6ced564f-bc08-44da-a938-73c795aff61d]
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:PathSeparator() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 terminal.go:Pwd:189 → C:\Users\ThomseC
[TRACE] 21:23:10.411 terminal.go:Pwd() - 0s
[DEBUG] 21:23:10.411 terminal_windows.go:58 → C:\Users\ThomseC
[TRACE] 21:23:10.411 terminal_windows.go:IsWsl() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 terminal.go:User:330 → ThomseC
[TRACE] 21:23:10.411 terminal.go:User() - 0s
[DEBUG] 21:23:10.411 terminal.go:Host:347 → PXL-PW0BHLWT
[TRACE] 21:23:10.411 terminal.go:Host() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 terminal.go:Getenv:164 → NO DATA
[TRACE] 21:23:10.411 terminal.go:Getenv(SHLVL) - 0s
[TRACE] 21:23:10.411 terminal.go:TemplateCache() - 0s
[TRACE] 21:23:10.411 terminal.go:Shell() - 0s
[DEBUG] 21:23:10.411 terminal.go:Getenv:164 → 12
[TRACE] 21:23:10.411 terminal.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 21:23:10.411 terminal.go:Getenv:164 → 1
[TRACE] 21:23:10.411 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 21:23:10.411 terminal.go:Flags() - 0s
[TRACE] 21:23:10.411 terminal.go:Flags() - 0s
[TRACE] 21:23:10.411 terminal.go:Flags() - 0s
[TRACE] 21:23:10.411 terminal.go:Flags() - 0s
[TRACE] 21:23:10.411 terminal.go:Pwd() - 0s
[TRACE] 21:23:10.411 terminal.go:Pwd() - 0s
[DEBUG] 21:23:10.411 terminal_windows.go:58 → C:\Users\ThomseC
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 terminal_windows.go:58 → C:\Users\ThomseC
[TRACE] 21:23:10.411 terminal.go:Flags() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 segment.go:SetEnabled:115 → segment: Git
[DEBUG] 21:23:10.411 segment.go:SetEnabled:115 → segment: Root
[TRACE] 21:23:10.411 terminal.go:Pwd() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 terminal.go:Getenv:164 → C:\Users\ThomseC\AppData\Local
[TRACE] 21:23:10.411 terminal.go:Getenv(LOCALAPPDATA) - 0s
[DEBUG] 21:23:10.411 terminal_windows.go:58 → C:\Users\ThomseC
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 segment.go:SetEnabled:115 → segment: Path
[TRACE] 21:23:10.411 terminal_windows.go:Root() - 0s
[DEBUG] 21:23:10.411 path.go:149 → display_cygpath: false
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:PathSeparator() - 0s
[TRACE] 21:23:10.411 terminal.go:Pwd() - 0s
[TRACE] 21:23:10.411 terminal.go:Shell() - 0s
[TRACE] 21:23:10.411 terminal.go:Shell() - 0s
[TRACE] 21:23:10.411 terminal.go:Flags() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 path.go:setMappedLocations:563 → mapped_locations_enabled: true
[DEBUG] 21:23:10.411 path.go:setMappedLocations:564 → 
[DEBUG] 21:23:10.411 path.go:setMappedLocations:565 → 
[DEBUG] 21:23:10.411 terminal_windows.go:58 → C:\Users\ThomseC
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:PathSeparator() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[DEBUG] 21:23:10.411 path.go:setMappedLocations:566 → ~
[DEBUG] 21:23:10.411 path.go:setMappedLocations:571 → mapped_locations: map[]
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:PathSeparator() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:PathSeparator() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:Flags() - 0s
[DEBUG] 21:23:10.411 path.go:colorizePath:740 → cycle: []
[DEBUG] 21:23:10.411 path.go:getFolderSeparator:273 → NO DATA
[DEBUG] 21:23:10.411 path.go:getFolderSeparator:275 → \
[DEBUG] 21:23:10.411 path.go:colorizePath:743 → cycle_folder_separator: false
[DEBUG] 21:23:10.411 path.go:colorizePath:744 → %s
[DEBUG] 21:23:10.411 path.go:colorizePath:746 → %s
[DEBUG] 21:23:10.411 path.go:colorizePath:747 → %s
[DEBUG] 21:23:10.411 path.go:colorizePath:748 → %s
[TRACE] 21:23:10.411 terminal.go:Pwd() - 0s
[TRACE] 21:23:10.411 terminal.go:TemplateCache() - 0s
[TRACE] 21:23:10.411 terminal.go:GOOS() - 0s
[TRACE] 21:23:10.411 terminal.go:StackCount() - 0s
[DEBUG] 21:23:10.413 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 21:23:10.413 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 21:23:10.413 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 21:23:10.414 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 21:23:10.414 terminal_windows.go:DirIsWritable() - 2.5113ms
[TRACE] 21:23:10.414 terminal.go:TemplateCache() - 0s
[DEBUG] 21:23:10.415 terminal.go:CommandPath:389 → C:\Users\ThomseC\AppData\Local\Programs\Git\cmd\git.exe
[TRACE] 21:23:10.415 terminal.go:CommandPath(git.exe) - 3.5112ms
[TRACE] 21:23:10.415 terminal.go:HasCommand(git.exe) - 3.5112ms
[DEBUG] 21:23:10.415 git.go:shouldDisplay:312 → fetch_bare_info: false
[TRACE] 21:23:10.415 terminal.go:Pwd() - 0s
[DEBUG] 21:23:10.415 terminal.go:ResolveSymlink:286 → C:\Users\ThomseC
[TRACE] 21:23:10.416 terminal.go:ResolveSymlink(C:\Users\ThomseC) - 998.4µs
[ERROR] 21:23:10.416 terminal.go:HasParentFilePath:553 → CreateFile .git: The system cannot find the file specified.
[TRACE] 21:23:10.416 terminal.go:HasParentFilePath(.git) - 998.4µs
[DEBUG] 21:23:10.416 text.go:Render:80 → rendering template:  {{ .Path }}
[TRACE] 21:23:10.416 terminal.go:Flags() - 0s
[TRACE] 21:23:10.416 terminal.go:TemplateCache() - 0s
[DEBUG] 21:23:10.416 text.go:Render:80 → rendering template: plain
[TRACE] 21:23:10.416 terminal.go:Flags() - 0s
[DEBUG] 21:23:10.416 text.go:Render:80 → rendering template: powerline
[TRACE] 21:23:10.416 terminal.go:Flags() - 0s
[DEBUG] 21:23:10.416 text.go:Render:80 → rendering template: diamond
[TRACE] 21:23:10.416 terminal.go:Flags() - 0s
[TRACE] 21:23:10.416 terminal.go:Shell() - 0s
[TRACE] 21:23:10.416 terminal.go:Shell() - 0s
[TRACE] 21:23:10.416 terminal.go:Flags() - 0s
[TRACE] 21:23:10.416 terminal.go:Shell() - 0s
[DEBUG] 21:23:10.416 terminal.go:Getenv:164 → C:\Users\ThomseC\AppData\Local
[TRACE] 21:23:10.416 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 21:23:10.416 terminal.go:CachePath() - 0s
[TRACE] 21:23:10.416 terminal.go:Flags() - 0s
 ~ 
back-lacking commented 4 days ago

image

is this what youre referring to? wondering if this issue is talking about the same issue im having before i make a new issue on this

JanDeDobbeleer commented 4 days ago

@ChadThomsen @back-lacking this is a pwsh 7.4 bug they introduced, I linked the issue I created on their end. You can fix it as indicated in this comment.

ChadThomsen commented 4 days ago

Yup that was the issue. Interesting that I ran into the issue on Windows 11 Enterpise, and not Windows 11 Home. Other than the OS slight difference the build numbers are identical for the OS, PowerShell, Oh My Posh and many other things. Thanks!

Thanks,

Chad Thomsen

On Wed, Sep 25, 2024 at 4:28 AM Jan De Dobbeleer @.***> wrote:

@ChadThomsen https://github.com/ChadThomsen @back-lacking https://github.com/back-lacking this is a pwsh 7.4 bug they introduced, I linked the issue I created on their end. You can fix it as indicated in this comment https://github.com/JanDeDobbeleer/oh-my-posh/issues/5662#issuecomment-2371986154 .

— Reply to this email directly, view it on GitHub https://github.com/JanDeDobbeleer/oh-my-posh/issues/5665#issuecomment-2373411661, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSC7IYY5WE22WK7ZLPZE7TZYJX2DAVCNFSM6AAAAABOZOGV7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTGQYTCNRWGE . You are receiving this because you were mentioned.Message ID: @.***>