JanDeDobbeleer / oh-my-posh

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

Render error in powershell #4152

Closed thepluck closed 1 year ago

thepluck commented 1 year ago

Code of Conduct

What happened?

Expected behavior

Oh my posh displays correctly.

Actual behavior

Every line is broken, .i.e have extra spaces. image

Step to reproduce

Install oh my posh from winget and use the default setting.

Theme

The default "jandedobbeleer" theme.

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 18.3.3

Shell: powershell (5.1.22621.1778)

Prompt:

 doesn   ~                                                                             in powershell at 22:09:56
Segments:

ConsoleTitle(true)                        -   1 ms
Session(true)                             -   1 ms
Path(true)                                -   3 ms
Git(false)                                -   3 ms
Root(false)                               -   0 ms
Exit(true)                                -   2 ms
Node(false)                               -   0 ms
Go(false)                                 -   0 ms
Python(false)                             -   0 ms
Shell(true)                               -   0 ms
Time(true)                                -   0 ms

Run duration: 18.9828ms

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

Config path: no --config set, using default built-in configuration

Logs:

[DEBUG] 22:09:56.827 shell.go:Getenv:389 → NO DATA
[TRACE] 22:09:56.827 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 22:09:56.827 shell.go:Getenv:389 → C:\Users\doesn\AppData\Local
[TRACE] 22:09:56.827 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 22:09:56.827 shell_windows.go:CachePath() - 0s
[DEBUG] 22:09:56.827 shell.go:Getenv:389 → NO DATA
[TRACE] 22:09:56.827 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 22:09:56.827 shell.go:resolveConfigPath:317 → No config set, fallback to default config
[TRACE] 22:09:56.827 shell.go:resolveConfigPath() - 0s
[TRACE] 22:09:56.827 shell.go:Init() - 0s
[TRACE] 22:09:56.827 shell.go:Flags() - 0s
[DEBUG] 22:09:56.827 config.go:loadConfig:129 → no config file specified, using default
[TRACE] 22:09:56.827 config.go:loadConfig() - 0s
[TRACE] 22:09:56.827 shell.go:Flags() - 0s
[DEBUG] 22:09:56.827 shell.go:Getenv:389 → NO DATA
[TRACE] 22:09:56.827 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 22:09:56.827 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[TRACE] 22:09:56.827 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.827 shell_windows.go:WindowsRegistryKeyValue:215 → ColorizationColor(DWORD): 0xC40078D4
[DEBUG] 22:09:56.827 shell.go:Shell:629 → no shell name provided in flags, trying to detect it
[DEBUG] 22:09:56.839 shell.go:Shell:637 → process name: powershell.exe
[TRACE] 22:09:56.839 shell.go:Shell() - 11.3181ms
[DEBUG] 22:09:56.839 shell.go:Getenv:389 → 5.1.22621.1778
[TRACE] 22:09:56.839 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 22:09:56.839 debug.go:PrintDebug:22 → Segment: Title
[TRACE] 22:09:56.839 shell_windows.go:Root() - 0s
[TRACE] 22:09:56.839 shell.go:Shell() - 0s
[TRACE] 22:09:56.839 shell.go:StatusCodes() - 0s
[TRACE] 22:09:56.839 shell_windows.go:IsWsl() - 0s
[DEBUG] 22:09:56.839 shell.go:TemplateCache:810 → environment: [=::=::\ ACSetupSvcPort=23210 ACSvcPort=17532 ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\doesn\AppData\Roaming CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=LANHF ComSpec=C:\WINDOWS\system32\cmd.exe CONDA_PROMPT_MODIFIER=False DriverData=C:\Windows\System32\Drivers\DriverData EFC_10520=1 EnableLog=INFO FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer FPS_BROWSER_USER_PROFILE_STRING=Default HOMEDRIVE=C: HOMEPATH=\Users\doesn LOCALAPPDATA=C:\Users\doesn\AppData\Local LOGONSERVER=\\LANHF NUMBER_OF_PROCESSORS=16 OneDrive=C:\Users\doesn\OneDrive OS=Windows_NT Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\msys64\ucrt64\bin;C:\Program Files\Git\cmd;C:\Users\doesn\AppData\Local\Microsoft\WindowsApps;C:\Users\doesn\AppData\Local\GitHubDesktop\bin;C:\Users\doesn\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\doesn\AppData\Local\Programs\oh-my-posh\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL POSH_AZURE_ENABLED=False POSH_CURSOR_COLUMN=1 POSH_CURSOR_LINE=7 POSH_GIT_ENABLED=False POSH_INSTALLER=ws POSH_PID=22424 POSH_SHELL_VERSION=5.1.22621.1778 POSH_THEMES_PATH=C:\Users\doesn\AppData\Local\Programs\oh-my-posh\themes POWERLINE_COMMAND=oh-my-posh PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=AMD64 Family 25 Model 68 Stepping 1, AuthenticAMD PROCESSOR_LEVEL=25 PROCESSOR_REVISION=4401 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PSModulePath=C:\Users\doesn\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public RlsSvcPort=22112 SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\doesn\AppData\Local\Temp TMP=C:\Users\doesn\AppData\Local\Temp USERDOMAIN=LANHF USERDOMAIN_ROAMINGPROFILE=LANHF USERNAME=doesn USERPROFILE=C:\Users\doesn windir=C:\WINDOWS]
[TRACE] 22:09:56.839 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.840 shell.go:Pwd:419 → C:\Users\doesn
[TRACE] 22:09:56.840 shell.go:Pwd() - 551.4µs
[DEBUG] 22:09:56.840 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.840 shell.go:User:540 → doesn
[TRACE] 22:09:56.840 shell.go:User() - 0s
[DEBUG] 22:09:56.840 shell.go:Host:552 → lanhf
[TRACE] 22:09:56.840 shell.go:Host() - 0s
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.840 shell.go:Getenv:389 → NO DATA
[TRACE] 22:09:56.840 shell.go:Getenv(SHLVL) - 0s
[TRACE] 22:09:56.840 shell.go:TemplateCache() - 551.4µs
[DEBUG] 22:09:56.840 shell.go:Getenv:389 → 7
[TRACE] 22:09:56.840 shell.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 22:09:56.840 shell.go:Getenv:389 → 1
[TRACE] 22:09:56.840 shell.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 22:09:56.840 shell.go:Flags() - 0s
[TRACE] 22:09:56.840 shell.go:Flags() - 0s
[TRACE] 22:09:56.840 shell.go:Shell() - 0s
[TRACE] 22:09:56.840 shell.go:Flags() - 0s
[TRACE] 22:09:56.840 shell.go:Flags() - 0s
[TRACE] 22:09:56.840 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.840 properties.go:GetString:28 → {{ .Code }}
[TRACE] 22:09:56.840 shell.go:Pwd() - 0s
[TRACE] 22:09:56.840 shell.go:Flags() - 0s
[DEBUG] 22:09:56.840 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[TRACE] 22:09:56.840 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.840 shell_windows.go:56 → C:\Users\doesn
[DEBUG] 22:09:56.840 segment.go:SetEnabled:494 → Segment: Exit
[TRACE] 22:09:56.840 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.840 segment.go:SetEnabled:494 → Segment: Path
[TRACE] 22:09:56.840 shell.go:StatusCodes() - 0s
[DEBUG] 22:09:56.840 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.840 shell.go:Pwd() - 0s
[TRACE] 22:09:56.841 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.841 segment.go:SetEnabled:494 → Segment: Session
[DEBUG] 22:09:56.841 shell.go:Getenv:389 → NO DATA
[TRACE] 22:09:56.841 shell.go:Shell() - 0s
[TRACE] 22:09:56.841 shell.go:Getenv(SSH_CONNECTION) - 0s
[TRACE] 22:09:56.841 shell.go:Shell() - 0s
[DEBUG] 22:09:56.841 shell.go:Getenv:389 → NO DATA
[TRACE] 22:09:56.841 shell.go:Flags() - 0s
[TRACE] 22:09:56.841 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 22:09:56.841 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.841 shell.go:Pwd() - 0s
[TRACE] 22:09:56.841 shell.go:Flags() - 0s
[DEBUG] 22:09:56.841 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.841 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.841 segment.go:SetEnabled:494 → Segment: Git
[TRACE] 22:09:56.841 shell.go:GOOS() - 0s
[TRACE] 22:09:56.841 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.841 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 22:09:56.841 properties.go:GetString:28 → 
[DEBUG] 22:09:56.841 properties.go:GetString:28 → 
[DEBUG] 22:09:56.841 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.841 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.841 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.841 shell.go:GOOS() - 0s
[TRACE] 22:09:56.841 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.841 properties.go:GetString:28 → ~
[DEBUG] 22:09:56.841 segment.go:SetEnabled:494 → Segment: Root
[DEBUG] 22:09:56.842 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 22:09:56.842 shell.go:PathSeparator() - 0s
[TRACE] 22:09:56.842 shell_windows.go:Root() - 531.8µs
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:PathSeparator() - 0s
[TRACE] 22:09:56.842 shell.go:PathSeparator() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:PathSeparator() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:PathSeparator() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:GOOS() - 0s
[TRACE] 22:09:56.842 shell.go:PathSeparator() - 0s
[TRACE] 22:09:56.842 shell.go:Pwd() - 0s
[TRACE] 22:09:56.842 shell_windows.go:IsWsl() - 0s
[TRACE] 22:09:56.842 shell.go:StackCount() - 0s
[TRACE] 22:09:56.842 shell.go:TemplateCache() - 0s
[DEBUG] 22:09:56.842 properties.go:GetBool:22 → always_enabled: true
[TRACE] 22:09:56.842 shell.go:TemplateCache() - 0s
[DEBUG] 22:09:56.843 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 22:09:56.843 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 22:09:56.843 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 22:09:56.843 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 22:09:56.843 shell_windows.go:DirIsWritable() - 1.1081ms
[TRACE] 22:09:56.843 shell.go:TemplateCache() - 0s
[DEBUG] 22:09:56.844 shell.go:CommandPath:591 → C:\Program Files\Git\cmd\git.exe
[TRACE] 22:09:56.844 shell.go:CommandPath(git.exe) - 2.6839ms
[TRACE] 22:09:56.844 shell.go:HasCommand(git.exe) - 2.6839ms
[TRACE] 22:09:56.844 shell.go:Pwd() - 0s
[ERROR] 22:09:56.844 shell.go:HasParentFilePath:725 → CreateFile .git: The system cannot find the file specified.
[TRACE] 22:09:56.844 shell.go:HasParentFilePath(.git) - 522µs
[DEBUG] 22:09:56.844 properties.go:GetBool:22 → fetch_bare_info: false
[TRACE] 22:09:56.844 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.844 shell.go:Shell() - 0s
[TRACE] 22:09:56.845 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.845 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.845 shell.go:Shell() - 0s
[TRACE] 22:09:56.845 shell.go:Shell() - 0s
[TRACE] 22:09:56.845 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.845 shell.go:Shell() - 0s
[TRACE] 22:09:56.845 shell.go:Shell() - 0s
[TRACE] 22:09:56.845 shell.go:Shell() - 0s
[TRACE] 22:09:56.845 shell.go:Flags() - 0s
[TRACE] 22:09:56.845 shell.go:Flags() - 0s
[TRACE] 22:09:56.845 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.845 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.845 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.845 segment.go:SetEnabled:494 → Segment: Time
[TRACE] 22:09:56.845 shell.go:Flags() - 0s
[TRACE] 22:09:56.845 shell.go:Pwd() - 0s
[TRACE] 22:09:56.845 shell.go:Flags() - 0s
[DEBUG] 22:09:56.845 properties.go:GetString:28 → 15:04:05
[TRACE] 22:09:56.845 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.845 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.845 shell_windows.go:56 → C:\Users\doesn
[DEBUG] 22:09:56.845 properties.go:GetString:28 → files
[TRACE] 22:09:56.845 shell.go:Flags() - 0s
[DEBUG] 22:09:56.845 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.845 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.845 segment.go:SetEnabled:494 → Segment: Go
[TRACE] 22:09:56.845 shell.go:Pwd() - 0s
[TRACE] 22:09:56.845 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.845 properties.go:GetStringArray:52 → extensions: [*.go go.mod]
[TRACE] 22:09:56.845 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.845 segment.go:SetEnabled:494 → Segment: Node
[DEBUG] 22:09:56.845 segment.go:SetEnabled:494 → Segment: Python
[DEBUG] 22:09:56.845 properties.go:GetBool:22 → home_enabled: false
[TRACE] 22:09:56.845 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.845 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 22:09:56.845 shell_windows.go:56 → C:\Users\doesn
[DEBUG] 22:09:56.845 shell_windows.go:56 → C:\Users\doesn
[DEBUG] 22:09:56.845 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv env venv-win pyenv-win]
[TRACE] 22:09:56.845 shell.go:GOOS() - 0s
[DEBUG] 22:09:56.845 properties.go:GetBool:22 → home_enabled: false
[DEBUG] 22:09:56.845 segment.go:SetEnabled:494 → Segment: Shell
[TRACE] 22:09:56.845 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.845 properties.go:GetStringArray:52 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .npmrc .vue]
[DEBUG] 22:09:56.845 shell_windows.go:56 → C:\Users\doesn
[DEBUG] 22:09:56.845 properties.go:GetStringArray:52 → folders: []
[DEBUG] 22:09:56.845 properties.go:GetKeyValueMap:46 → mapped_shell_names: map[]
[TRACE] 22:09:56.845 shell.go:Shell() - 0s
[DEBUG] 22:09:56.845 properties.go:GetBool:22 → home_enabled: false
[TRACE] 22:09:56.845 shell.go:Flags() - 0s
[TRACE] 22:09:56.845 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.845 shell.go:Pwd() - 0s
[DEBUG] 22:09:56.845 shell_windows.go:56 → C:\Users\doesn
[TRACE] 22:09:56.846 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.846 shell.go:Shell() - 0s
[TRACE] 22:09:56.846 shell.go:TemplateCache() - 0s
[TRACE] 22:09:56.846 shell.go:Shell() - 0s
[TRACE] 22:09:56.846 shell.go:Shell() - 0s
[TRACE] 22:09:56.846 shell.go:Shell() - 0s
[TRACE] 22:09:56.846 shell.go:Flags() - 0s
[TRACE] 22:09:56.846 shell.go:Shell() - 0s
[TRACE] 22:09:56.846 shell.go:Shell() - 0s
[DEBUG] 22:09:56.846 shell_windows.go:TerminalWidth:109 → terminal width: 120
[TRACE] 22:09:56.846 shell_windows.go:TerminalWidth() - 0s
[DEBUG] 22:09:56.846 shell.go:Getenv:389 → C:\Users\doesn\AppData\Local
[TRACE] 22:09:56.846 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 22:09:56.846 shell_windows.go:CachePath() - 0s
[TRACE] 22:09:56.846 shell.go:Flags() - 0s
JanDeDobbeleer commented 1 year ago

If you mean the black triangles, that's a terminal issue. When using Windows Terminal, change to the new Atlas engine. Not something we can fix.

github-actions[bot] commented 7 months ago

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.