JanDeDobbeleer / oh-my-posh

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

Unable to pull the json theme file from the remote repository and apply it successfully๐Ÿ˜ฃ #5895

Closed dosicker closed 1 week ago

dosicker commented 1 week ago

Code of Conduct

What happened?

I'm not sure if this is a bug or an API adjustment, I'll mention it in the bug category first~๐Ÿ™ I can guarantee that there is no problem in v23+ < v24, because I upgraded to the latest version in v23.20.3. And before I raised this question, I also searched for related issues, but none of them were successfully resolved. Maybe it's because of the important changes in the latest version that no one has encountered my situation yet? So, the current problem is that after configuring the remote json file theme, it cannot be displayed normally, but still reads the default local theme file. Other local themes are also OK. I tried to put the remote theme locally and can read and apply the theme normally, but it cannot be applied normally in the remote (including the official remote themes...) After looking at the debug, I found that the error point seems to be difficult to analyze in a short time. Now I want to trouble the author JanDeDobbeleer or someone who has encountered this problem to help me see what is going on?

Theme

theme config๏ผšhttps://raw.githubusercontent.com/dosicker/terminal-beautify/main/config/agxm.omp.json

Normal display๏ผˆomp v23.20.3๏ผ‰: image

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 24.5.1

Shell: pwsh (5.1.19041.4522)

Prompt:

๎‚ถ dosicker ๎‚ฐ๎‚ฐ ๎ชƒ C:\ ๎‚ฐ๎‚ฐ ๏€Œ ๎‚ด                                                                           in pwsh at 16:22:19

Segments:

ConsoleTitle(true) -   0 ms
Session(true)      -   0 ms
Path(true)         -   1 ms
Git(false)         -  23 ms
Root(false)        -   0 ms
Status(true)       -   0 ms
Node(false)        -   0 ms
Go(false)          -   0 ms
Python(false)      -   1 ms
Shell(true)        -   0 ms
Time(true)         -   0 ms

Run duration: 49.7739ms

Cache path: O:\ProgramData\oh-my-posh

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

Logs:

[DEBUG] 16:22:19.045 command.go:execute:989 โ†’ debug mode enabled
[TRACE] 16:22:19.067 debug.go() - 0s
[DEBUG] 16:22:19.067 load.go:Load:28 โ†’ no config file specified, using default
[TRACE] 16:22:19.067 load.go:Load() - 0s
[TRACE] 16:22:19.067 debug.go() - 0s
[TRACE] 16:22:19.067 terminal.go() - 0s
[DEBUG] 16:22:19.067 terminal.go:59 โ†’ loading cache file: O:\ProgramData\oh-my-posh\omp.cache
[TRACE] 16:22:19.067 terminal.go(O:\ProgramData\oh-my-posh\omp.cache) - 0s
[TRACE] 16:22:19.068 terminal.go() - 0s
[DEBUG] 16:22:19.068 terminal.go:59 โ†’ loading cache file: O:\ProgramData\oh-my-posh\omp.cache.d4c994ec-6a0b-40eb-8e39-915eab7d598a
[DEBUG] 16:22:19.068 terminal.go:59 โ†’ loading cache key: prompt_count_cache
[DEBUG] 16:22:19.068 terminal.go:59 โ†’ loading cache key: template_cache
[TRACE] 16:22:19.068 terminal.go(O:\ProgramData\oh-my-posh\omp.cache.d4c994ec-6a0b-40eb-8e39-915eab7d598a) - 0s
[TRACE] 16:22:19.068 terminal.go:Init() - 0s
[TRACE] 16:22:19.068 terminal.go() - 0s
[DEBUG] 16:22:19.068 terminal.go:Init:67 โ†’ C:\
[TRACE] 16:22:19.068 terminal.go:Init() - 0s
[TRACE] 16:22:19.068 debug.go() - 531.4ยตs
[TRACE] 16:22:19.068 init.go:Init() - 0s
[TRACE] 16:22:19.068 cache.go:loadCache() - 0s
[TRACE] 16:22:19.068 cache.go:loadCache() - 510ยตs
[DEBUG] 16:22:19.068 debug.go:61 โ†’ terminal program: Windows Terminal
[DEBUG] 16:22:19.068 debug.go:61 โ†’ terminal shell: shell
[DEBUG] 16:22:19.068 config.go:MakeColors:56 โ†’ NO DATA
[TRACE] 16:22:19.068 config.go:MakeColors(OMP_CACHE_DISABLED) - 0s
[TRACE] 16:22:19.068 colors_windows.go:GetAccentColor(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[DEBUG] 16:22:19.068 colors_windows.go:GetAccentColor:19 โ†’ ColorizationColor(DWORD): 0xC4486860
[TRACE] 16:22:19.068 colors.go:SetAccentColor() - 0s
[TRACE] 16:22:19.068 colors.go:MakeColors() - 0s
[TRACE] 16:22:19.068 debug.go:PrintDebug() - 0s
[DEBUG] 16:22:19.068 debug.go:PrintDebug:16 โ†’ 5.1.19041.4522
[TRACE] 16:22:19.068 debug.go:PrintDebug(POSH_SHELL_VERSION) - 0s
[DEBUG] 16:22:19.068 debug.go:72 โ†’ segment: Title
[TRACE] 16:22:19.069 engine.go:getTitleTemplateText({{ .Shell }} in {{ .Folder }}) - 511.9ยตs
[TRACE] 16:22:19.069 primary.go:needsPrimaryRightPrompt() - 0s
[DEBUG] 16:22:19.069 terminal.go:CursorPosition:590 โ†’ 36
[TRACE] 16:22:19.069 terminal.go:CursorPosition(POSH_CURSOR_LINE) - 0s
[DEBUG] 16:22:19.069 terminal.go:CursorPosition:594 โ†’ 1
[TRACE] 16:22:19.069 terminal.go:CursorPosition(POSH_CURSOR_COLUMN) - 503.3ยตs
[TRACE] 16:22:19.069 primary.go:writePrimaryPrompt() - 0s
[TRACE] 16:22:19.069 primary.go:writePrimaryPrompt() - 0s
[TRACE] 16:22:19.069 segment.go:Execute() - 0s
[TRACE] 16:22:19.069 segment.go:Execute() - 0s
[DEBUG] 16:22:19.069 home.go:Home:26 โ†’ C:\Users\dosicker
[DEBUG] 16:22:19.069 home.go:Home:26 โ†’ C:\Users\dosicker
[DEBUG] 16:22:19.069 home.go:Home:26 โ†’ C:\Users\dosicker
[TRACE] 16:22:19.069 terminal.go:DirMatchesOneOf() - 0s
[TRACE] 16:22:19.069 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 16:22:19.069 segment.go:Execute:109 โ†’ segment: Status
[DEBUG] 16:22:19.069 segment.go:Execute:109 โ†’ segment: Git
[TRACE] 16:22:19.069 segment.go:Execute() - 0s
[DEBUG] 16:22:19.069 segment.go:Execute:109 โ†’ segment: Session
[TRACE] 16:22:19.069 status.go:Enabled() - 0s
[DEBUG] 16:22:19.069 session.go:activeSSHSession:31 โ†’ NO DATA
[TRACE] 16:22:19.069 scm.go:hasCommand() - 0s
[DEBUG] 16:22:19.069 home.go:Home:26 โ†’ C:\Users\dosicker
[TRACE] 16:22:19.069 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 16:22:19.069 home.go:Home:26 โ†’ C:\Users\dosicker
[DEBUG] 16:22:19.069 segment.go:Execute:109 โ†’ segment: Root
[TRACE] 16:22:19.069 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 16:22:19.069 segment.go:Execute:109 โ†’ segment: Path
[DEBUG] 16:22:19.069 path.go:147 โ†’ display_cygpath: false
[TRACE] 16:22:19.069 status.go:formatStatus({{ .Code }}) - 0s
[TRACE] 16:22:19.069 path.go:setPaths() - 0s
[TRACE] 16:22:19.069 path.go:setPaths() - 0s
[TRACE] 16:22:19.069 path.go:setPaths() - 0s
[DEBUG] 16:22:19.069 status.go:Enabled:37 โ†’ always_enabled: true
[TRACE] 16:22:19.069 path.go:setPaths() - 0s
[TRACE] 16:22:19.069 path.go:parsePath() - 0s
[TRACE] 16:22:19.069 root.go:Enabled() - 0s
[DEBUG] 16:22:19.069 path.go:setMappedLocations:557 โ†’ mapped_locations_enabled: true
[DEBUG] 16:22:19.069 path.go:setMappedLocations:558 โ†’ ๏€“
[DEBUG] 16:22:19.069 path.go:setMappedLocations:559 โ†’ ๏€“
[DEBUG] 16:22:19.069 home.go:Home:26 โ†’ C:\Users\dosicker
[TRACE] 16:22:19.069 clean.go:Clean() - 0s
[TRACE] 16:22:19.070 path.go:normalize() - 0s
[DEBUG] 16:22:19.070 path.go:setMappedLocations:560 โ†’ ~
[DEBUG] 16:22:19.070 path.go:setMappedLocations:565 โ†’ mapped_locations: map[]
[TRACE] 16:22:19.070 clean.go:Clean() - 0s
[TRACE] 16:22:19.070 path.go:normalize() - 0s
[TRACE] 16:22:19.070 path.go:normalize() - 0s
[TRACE] 16:22:19.070 segment.go:string( {{ if .SSHSession }}๎ฎฉ {{ end }}{{ .UserName }} ) - 617ยตs
[TRACE] 16:22:19.070 path.go:parsePath() - 0s
[TRACE] 16:22:19.070 path.go:parsePath() - 0s
[TRACE] 16:22:19.070 path.go:parsePath() - 0s
[TRACE] 16:22:19.070 segment.go:resolve(diamond) - 0s
[TRACE] 16:22:19.070 path.go:setStyle() - 0s
[DEBUG] 16:22:19.070 path.go:getFolderSeparator:267 โ†’ NO DATA
[DEBUG] 16:22:19.070 path.go:getFolderSeparator:269 โ†’ \
[DEBUG] 16:22:19.070 path.go:colorizePath:734 โ†’ cycle: []
[DEBUG] 16:22:19.070 path.go:getFolderSeparator:267 โ†’ NO DATA
[DEBUG] 16:22:19.070 path.go:getFolderSeparator:269 โ†’ \
[DEBUG] 16:22:19.070 path.go:colorizePath:737 โ†’ cycle_folder_separator: false
[DEBUG] 16:22:19.070 path.go:colorizePath:738 โ†’ %s
[DEBUG] 16:22:19.070 path.go:colorizePath:740 โ†’ %s
[DEBUG] 16:22:19.070 path.go:colorizePath:741 โ†’ %s
[DEBUG] 16:22:19.070 path.go:colorizePath:742 โ†’ %s
[TRACE] 16:22:19.070 path.go:Enabled() - 0s
[TRACE] 16:22:19.070 path.go:Enabled() - 0s
[TRACE] 16:22:19.070 path.go:Enabled() - 0s
[DEBUG] 16:22:19.070 terminal_windows.go:DirIsWritable:216 โ†’ current user is member of S-1-5-11
[DEBUG] 16:22:19.070 win32_windows.go:isWriteable:271 โ†’ NO DATA
[DEBUG] 16:22:19.070 terminal_windows.go:DirIsWritable:216 โ†’ current user is member of S-1-5-11
[DEBUG] 16:22:19.070 win32_windows.go:isWriteable:271 โ†“
    GENERIC_READ
    GENERIC_WRITE
    GENERIC_EXECUTE
    DELETE
[DEBUG] 16:22:19.070 terminal_windows.go:DirIsWritable:216 โ†’ user has write access
[TRACE] 16:22:19.070 path.go:Enabled() - 516.9ยตs
[TRACE] 16:22:19.070 segment.go:string( ๎ชƒ {{ path .Path .Location }} ) - 0s
[TRACE] 16:22:19.070 segment.go:resolve(powerline) - 0s
[DEBUG] 16:22:19.092 terminal.go:HasCommand:323 โ†’ D:\Environment\Git\cmd\git.exe
[TRACE] 16:22:19.092 terminal.go:HasCommand(git.exe) - 22.649ms
[TRACE] 16:22:19.092 scm.go:hasCommand(git.exe) - 22.649ms
[DEBUG] 16:22:19.092 git.go:shouldDisplay:328 โ†’ fetch_bare_info: false
[DEBUG] 16:22:19.092 terminal.go:HasParentFilePath:453 โ†’ C:\
[TRACE] 16:22:19.092 terminal.go:HasParentFilePath(C:\) - 0s
[ERROR] 16:22:19.093 git.go:shouldDisplay:338 โ†’ CreateFile .git: The system cannot find the file specified.
[TRACE] 16:22:19.093 git.go:shouldDisplay(.git) - 512.5ยตs
[TRACE] 16:22:19.093 segment.go:resolve(powerline) - 0s
[TRACE] 16:22:19.093 segment.go:resolve(powerline) - 0s
[TRACE] 16:22:19.093 segment.go:string( {{ if gt .Code 0 }}๏€{{ else }}๏€Œ{{ end }} ) - 502.7ยตs
[TRACE] 16:22:19.093 list.go:FirstMatch({{ if gt .Code 0 }}p:red{{ end }}) - 0s
[TRACE] 16:22:19.093 segment.go:resolve(diamond) - 0s
[TRACE] 16:22:19.093 list.go:FirstMatch({{ if gt .Code 0 }}p:red{{ end }}) - 0s
[TRACE] 16:22:19.093 engine.go:applyPowerShellBleedPatch() - 0s
[TRACE] 16:22:19.093 segment.go:Execute() - 0s
[TRACE] 16:22:19.093 segment.go:Execute() - 0s
[TRACE] 16:22:19.093 segment.go:Execute() - 0s
[TRACE] 16:22:19.093 segment.go:Execute() - 0s
[DEBUG] 16:22:19.093 home.go:Home:26 โ†’ C:\Users\dosicker
[DEBUG] 16:22:19.093 home.go:Home:26 โ†’ C:\Users\dosicker
[DEBUG] 16:22:19.093 segment.go:Execute:109 โ†’ segment: Time
[TRACE] 16:22:19.093 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 16:22:19.093 segment.go:Execute:109 โ†’ segment: Node
[DEBUG] 16:22:19.093 python.go:Enabled:56 โ†’ files
[DEBUG] 16:22:19.093 home.go:Home:26 โ†’ C:\Users\dosicker
[DEBUG] 16:22:19.093 time.go:Enabled:27 โ†’ 15:04:05
[TRACE] 16:22:19.093 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 16:22:19.093 language.go:Enabled:117 โ†’ extensions: [*.go go.mod]
[DEBUG] 16:22:19.093 language.go:Enabled:117 โ†’ extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .vue]
[DEBUG] 16:22:19.093 language.go:Enabled:118 โ†’ folders: []
[DEBUG] 16:22:19.093 language.go:Enabled:118 โ†’ folders: []
[DEBUG] 16:22:19.093 language.go:Enabled:125 โ†’ home_enabled: false
[DEBUG] 16:22:19.093 language.go:Enabled:125 โ†’ home_enabled: false
[DEBUG] 16:22:19.093 language.go:Enabled:117 โ†’ extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 16:22:19.093 language.go:Enabled:118 โ†’ folders: [.venv venv virtualenv venv-win pyenv-win]
[DEBUG] 16:22:19.093 segment.go:Execute:109 โ†’ segment: Shell
[DEBUG] 16:22:19.093 language.go:Enabled:125 โ†’ home_enabled: false
[DEBUG] 16:22:19.093 home.go:Home:26 โ†’ C:\Users\dosicker
[DEBUG] 16:22:19.093 shell.go:Enabled:26 โ†’ mapped_shell_names: map[]
[DEBUG] 16:22:19.093 home.go:Home:26 โ†’ C:\Users\dosicker
[TRACE] 16:22:19.093 shell.go:Enabled() - 0s
[DEBUG] 16:22:19.093 language.go:Enabled:137 โ†’ files
[TRACE] 16:22:19.093 shell.go:Enabled() - 0s
[DEBUG] 16:22:19.093 home.go:Home:26 โ†’ C:\Users\dosicker
[DEBUG] 16:22:19.093 language.go:Enabled:137 โ†’ files
[DEBUG] 16:22:19.093 node.go:loadContext:48 โ†’ fetch_package_manager: false
[DEBUG] 16:22:19.093 python.go:loadContext:64 โ†’ fetch_virtual_env: false
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(*.js) - 517.1ยตs
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(*.ts) - 0s
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(package.json) - 0s
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(.nvmrc) - 0s
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(pnpm-workspace.yaml) - 0s
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(.pnpmfile.cjs) - 0s
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(.vue) - 0s
[TRACE] 16:22:19.094 segment.go:resolve(plain) - 0s
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(*.ipynb) - 0s
[TRACE] 16:22:19.094 terminal.go:HasFiles(*.go) - 517.1ยตs
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(pyproject.toml) - 0s
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[DEBUG] 16:22:19.094 terminal.go:HasFiles:114 โ†’ false
[TRACE] 16:22:19.094 terminal.go:HasFiles(venv.bak) - 0s
[TRACE] 16:22:19.094 terminal.go:HasFiles(go.mod) - 0s
[TRACE] 16:22:19.094 segment.go:resolve(plain) - 0s
[DEBUG] 16:22:19.094 language.go:hasLanguageFolders:198 โ†’ false
[TRACE] 16:22:19.094 language.go:hasLanguageFolders(.venv) - 0s
[DEBUG] 16:22:19.094 language.go:hasLanguageFolders:198 โ†’ false
[TRACE] 16:22:19.094 language.go:hasLanguageFolders(venv) - 0s
[DEBUG] 16:22:19.094 language.go:hasLanguageFolders:198 โ†’ false
[TRACE] 16:22:19.094 language.go:hasLanguageFolders(virtualenv) - 508.9ยตs
[DEBUG] 16:22:19.094 language.go:hasLanguageFolders:198 โ†’ false
[TRACE] 16:22:19.094 language.go:hasLanguageFolders(venv-win) - 0s
[DEBUG] 16:22:19.094 language.go:hasLanguageFolders:198 โ†’ false
[TRACE] 16:22:19.094 language.go:hasLanguageFolders(pyenv-win) - 0s
[TRACE] 16:22:19.094 segment.go:resolve(plain) - 0s
[TRACE] 16:22:19.094 segment.go:string(in <p:blue><b>{{ .Name }}</b></> ) - 0s
[TRACE] 16:22:19.094 segment.go:resolve(plain) - 0s
[TRACE] 16:22:19.094 segment.go:string(at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>) - 0s
[TRACE] 16:22:19.094 segment.go:resolve(plain) - 0s
[TRACE] 16:22:19.094 engine.go:applyPowerShellBleedPatch() - 0s
[TRACE] 16:22:19.094 primary.go:writePrimaryPrompt() - 0s
[TRACE] 16:22:19.094 engine.go:getTitleTemplateText({{ .Shell }} in {{ .Folder }}) - 0s
[TRACE] 16:22:19.094 primary.go:Primary() - 0s
[DEBUG] 16:22:19.094 terminal_windows.go:TerminalWidth:99 โ†’ terminal width: 120
[TRACE] 16:22:19.094 engine.go:canWriteRightBlock() - 0s
[TRACE] 16:22:19.095 debug.go:PrintDebug() - 0s
[TRACE] 16:22:19.095 debug.go:PrintDebug() - 0s