JanDeDobbeleer / oh-my-posh

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

CONFIG ERROR when specifying default config file #5418

Closed AlexAuragan closed 1 month ago

AlexAuragan commented 1 month ago

Code of Conduct

What happened?

Description

I just insalled oh-my-posh, added eval "$(oh-my-posh init zsh) in my .zshrc and omp worked great ! However, I then did oh-my-posh config export --format toml --output ~/.config/oh-my-posh/zen.toml (as well as json format), and as soon as I changed my zshrc to eval "$(oh-my-posh init zsh --config $HOME/dotfiles/oh-my-posh/.config/oh-my-posh/zen.toml)", I get this CONFIG ERROR in my prompt (without modifying)

Debugging steps

Theme

default

What OS are you seeing the problem on?

Linux

Which shell are you using?

zsh

Log output

Version: 23.6.0

Shell: zsh (5.9)

Prompt:

 alexandre   ]8;;file:/home/alexandre\~]8;;\  CONFIG ERROR  

Segments:

ConsoleTitle(true)                        -   1 ms
Session(true)                             -   2 ms
Path(true)                                -   0 ms
Status(true)                              -   1 ms
Shell(true)                               -   0 ms
Time(true)                                -   0 ms

Run duration: 9.698475ms

Cache path: /home/alexandre/.cache/oh-my-posh

Config path: /home/alexandre/.config/oh-my-posh/zen.toml

Logs:

[DEBUG] 23:19:25.269 debug.go:42 → debug mode enabled
[DEBUG] 23:19:25.269 debug.go:42 → plain mode enabled
[DEBUG] 23:19:25.269 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.269 terminal.go:Getenv(OMP_CACHE_DIR) - 20.436µs
[DEBUG] 23:19:25.269 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.269 terminal.go:Getenv(XDG_CACHE_HOME) - 5.163µs
[TRACE] 23:19:25.269 terminal_unix.go:CachePath() - 68.35µs
[DEBUG] 23:19:25.269 terminal.go:70 → loading cache file: /home/alexandre/.cache/oh-my-posh/omp.cache
[DEBUG] 23:19:25.269 terminal.go:70 → loading cache key: environment_platform
[DEBUG] 23:19:25.269 terminal.go:70 → loading cache key: is_wsl
[DEBUG] 23:19:25.269 terminal.go:70 → loading cache key: upgrade_check
[TRACE] 23:19:25.269 terminal.go(/home/alexandre/.cache/oh-my-posh/omp.cache) - 151.295µs
[DEBUG] 23:19:25.269 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.269 terminal.go:Getenv(OMP_CACHE_DIR) - 5.955µs
[DEBUG] 23:19:25.269 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.269 terminal.go:Getenv(XDG_CACHE_HOME) - 4.759µs
[TRACE] 23:19:25.269 terminal_unix.go:CachePath() - 35.705µs
[DEBUG] 23:19:25.269 terminal.go:70 → loading cache file: /home/alexandre/.cache/oh-my-posh/omp.cache.33636
[DEBUG] 23:19:25.269 terminal.go:70 → loading cache key: template_cache
[TRACE] 23:19:25.269 terminal.go(/home/alexandre/.cache/oh-my-posh/omp.cache.33636) - 155.65µs
[DEBUG] 23:19:25.269 terminal.go:Getenv:171 → /home/alexandre/dotfiles/oh-my-posh/.config/oh-my-posh/zen.toml
[TRACE] 23:19:25.269 terminal.go:Getenv(POSH_THEME) - 6.844µs
[DEBUG] 23:19:25.269 terminal_unix.go:Platform:92 → ubuntu
[TRACE] 23:19:25.269 terminal.go:resolveConfigPath() - 32.389µs
[TRACE] 23:19:25.269 terminal.go:SetPromptCount() - 1.588µs
[TRACE] 23:19:25.269 terminal.go:Init() - 637.768µs
[TRACE] 23:19:25.269 terminal.go:Flags() - 157ns
[TRACE] 23:19:25.270 load.go:loadConfig() - 466.633µs
[TRACE] 23:19:25.270 terminal.go:Flags() - 102ns
[DEBUG] 23:19:25.270 debug.go:50 → terminal program: Unknown
[DEBUG] 23:19:25.270 debug.go:50 → terminal shell: shell
[DEBUG] 23:19:25.270 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.270 terminal.go:Getenv(OMP_CACHE_DISABLED) - 5.807µs
[TRACE] 23:19:25.270 terminal.go:Shell() - 518ns
[DEBUG] 23:19:25.270 terminal.go:Getenv:171 → 5.9
[TRACE] 23:19:25.270 terminal.go:Getenv(POSH_SHELL_VERSION) - 24.085µs
[DEBUG] 23:19:25.270 debug.go:PrintDebug:23 → segment: Title
[DEBUG] 23:19:25.270 text.go:Render:80 → rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 23:19:25.270 terminal.go:Flags() - 94ns
[TRACE] 23:19:25.271 terminal_unix.go:Root() - 5.915µs
[TRACE] 23:19:25.271 terminal.go:Shell() - 616ns
[TRACE] 23:19:25.271 terminal.go:StatusCodes() - 715ns
[DEBUG] 23:19:25.271 terminal_unix.go:IsWsl:35 → false
[TRACE] 23:19:25.271 terminal_unix.go:IsWsl() - 29.681µs
[DEBUG] 23:19:25.271 terminal.go:TemplateCache:660 → environment: [QT_SCALE_FACTOR=1 USER=alexandre HYPRLAND_CMD=Hyprland HYPRLAND_INSTANCE_SIGNATURE=fe7b748eb668136dd0558b7c8279bfcd7ab4d759_1722971361 XDG_SEAT=seat0 XDG_SESSION_TYPE=wayland HOME=/home/alexandre MOZ_ENABLE_WAYLAND=1 DESKTOP_SESSION=hyprland GTK_MODULES=gail:atk-bridge DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus GSM_SKIP_SSH_AGENT_WORKAROUND=true QT_WAYLAND_DISABLE_WINDOWDECORATION=1 QT_QPA_PLATFORMTHEME=qt6ct WAYLAND_DISPLAY=wayland-1 LOGNAME=alexandre QT_AUTO_SCREEN_SCALE_FACTOR=1 XDG_SESSION_CLASS=user USERNAME=alexandre XDG_SESSION_ID=2 CLUTTER_BACKEND=wayland PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:~/pypr-env/bin/:/home/alexandre/.local/bin XDG_RUNTIME_DIR=/run/user/1000 GDK_BACKEND=wayland,x11 DISPLAY=:0 LANG=en_US.UTF-8 XDG_CURRENT_DESKTOP=Hyprland XDG_SESSION_DESKTOP=Hyprland SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh SHELL=/usr/bin/zsh GDMSESSION=hyprland QT_ACCESSIBILITY=1 _JAVA_AWT_WM_NONREPARENTING=1 XDG_VTNR=2 ELECTRON_OZONE_PLATFORM_HINT=auto PWD=/home/alexandre QT_QPA_PLATFORM=wayland;xcb XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_BACKEND=wayland KITTY_WINDOW_ID=1 TERM=xterm-kitty COLORTERM=truecolor KITTY_PID=33630 KITTY_PUBLIC_KEY=1:t@rC-e53!7^PaHa;6EOYHPQ0bKJN?6H+V8EcMm#e TERMINFO=/usr/lib/kitty/terminfo KITTY_INSTALLATION_DIR=/usr/lib/kitty SHLVL=1 OLDPWD=/home/alexandre ZSH=/home/alexandre/.oh-my-zsh FUNCNEST=100 PAGER=less LESS=-R LSCOLORS=Gxfxcxdxbxegedabagacad LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90: POSH_THEME=/home/alexandre/dotfiles/oh-my-posh/.config/oh-my-posh/zen.toml POSH_SHELL_VERSION=5.9 POSH_PID=33636 POWERLINE_COMMAND=oh-my-posh CONDA_PROMPT_MODIFIER=false POSH_PROMPT_COUNT=9 ZLE_RPROMPT_INDENT=0 HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew INFOPATH=/home/linuxbrew/.linuxbrew/share/info: _=/home/alexandre/.local/bin/oh-my-posh]
[TRACE] 23:19:25.271 terminal.go:GOOS() - 599ns
[DEBUG] 23:19:25.271 terminal.go:Pwd:201 → /home/alexandre
[TRACE] 23:19:25.271 terminal.go:Pwd() - 78.127µs
[DEBUG] 23:19:25.271 terminal_unix.go:IsWsl:35 → false
[TRACE] 23:19:25.271 terminal_unix.go:IsWsl() - 9.737µs
[TRACE] 23:19:25.271 terminal.go:GOOS() - 87ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 62ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 65ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 72ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 62ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 58ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 68ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 58ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 60ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 64ns
[TRACE] 23:19:25.271 terminal.go:GOOS() - 59ns
[DEBUG] 23:19:25.271 terminal.go:User:339 → alexandre
[TRACE] 23:19:25.271 terminal.go:User() - 6.516µs
[DEBUG] 23:19:25.271 terminal.go:Host:356 → alexandre-XPS-12-9Q23
[TRACE] 23:19:25.271 terminal.go:Host() - 10.462µs
[TRACE] 23:19:25.271 terminal.go:GOOS() - 71ns
[DEBUG] 23:19:25.271 terminal_unix.go:Platform:92 → ubuntu
[DEBUG] 23:19:25.271 terminal.go:Getenv:171 → 1
[TRACE] 23:19:25.271 terminal.go:Getenv(SHLVL) - 6.553µs
[TRACE] 23:19:25.271 terminal.go:TemplateCache() - 508.382µs
[TRACE] 23:19:25.271 terminal.go:Shell() - 162ns
[DEBUG] 23:19:25.271 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.271 terminal.go:Getenv(POSH_CURSOR_LINE) - 5.511µs
[DEBUG] 23:19:25.271 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.271 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 4.788µs
[TRACE] 23:19:25.271 terminal.go:Flags() - 91ns
[TRACE] 23:19:25.271 terminal.go:Flags() - 58ns
[TRACE] 23:19:25.271 terminal.go:Flags() - 228ns
[TRACE] 23:19:25.271 terminal.go:Flags() - 1.382µs
[TRACE] 23:19:25.271 terminal.go:Flags() - 314ns
[TRACE] 23:19:25.271 terminal.go:Flags() - 314ns
[TRACE] 23:19:25.272 terminal.go:Pwd() - 625ns
[TRACE] 23:19:25.272 terminal.go:GOOS() - 209ns
[DEBUG] 23:19:25.272 segment.go:SetEnabled:115 → segment: Session
[TRACE] 23:19:25.272 terminal.go:Pwd() - 484ns
[TRACE] 23:19:25.272 terminal.go:GOOS() - 129ns
[DEBUG] 23:19:25.272 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.272 terminal.go:Getenv(SSH_CONNECTION) - 15.897µs
[TRACE] 23:19:25.272 terminal.go:Pwd() - 342ns
[DEBUG] 23:19:25.272 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.272 terminal.go:Getenv(SSH_CLIENT) - 4.657µs
[DEBUG] 23:19:25.272 segment.go:SetEnabled:115 → segment: Path
[TRACE] 23:19:25.272 terminal.go:GOOS() - 152ns
[DEBUG] 23:19:25.272 segment.go:SetEnabled:115 → segment: Git
[TRACE] 23:19:25.272 terminal.go:GOOS() - 204ns
[TRACE] 23:19:25.272 terminal.go:PathSeparator() - 214ns
[TRACE] 23:19:25.272 terminal.go:Pwd() - 262ns
[DEBUG] 23:19:25.272 terminal_unix.go:IsWsl:35 → false
[TRACE] 23:19:25.272 terminal.go:Shell() - 244ns
[TRACE] 23:19:25.272 terminal_unix.go:IsWsl() - 12.68µs
[TRACE] 23:19:25.272 terminal.go:Shell() - 129ns
[TRACE] 23:19:25.272 terminal_unix.go:IsWsl2() - 22.399µs
[TRACE] 23:19:25.272 terminal.go:GOOS() - 129ns
[DEBUG] 23:19:25.272 path.go:replaceMappedLocations:520 → mapped_locations_enabled: true
[DEBUG] 23:19:25.272 path.go:replaceMappedLocations:521 → 
[DEBUG] 23:19:25.272 path.go:replaceMappedLocations:522 → 
[DEBUG] 23:19:25.272 terminal.go:CommandPath:398 → /usr/bin/git
[TRACE] 23:19:25.272 terminal.go:GOOS() - 207ns
[TRACE] 23:19:25.272 terminal.go:CommandPath(git) - 88.657µs
[DEBUG] 23:19:25.272 path.go:replaceMappedLocations:523 → ~
[TRACE] 23:19:25.272 terminal.go:HasCommand(git) - 100.125µs
[DEBUG] 23:19:25.272 path.go:replaceMappedLocations:528 → mapped_locations: map[]
[DEBUG] 23:19:25.272 git.go:shouldDisplay:285 → fetch_bare_info: false
[TRACE] 23:19:25.272 terminal.go:Pwd() - 553ns
[DEBUG] 23:19:25.272 terminal.go:ResolveSymlink:298 → /home/alexandre
[TRACE] 23:19:25.272 terminal.go:ResolveSymlink(/home/alexandre) - 27.809µs
[ERROR] 23:19:25.272 terminal.go:HasParentFilePath:562 → stat .git: no such file or directory
[TRACE] 23:19:25.272 terminal.go:HasParentFilePath(.git) - 168.681µs
[TRACE] 23:19:25.272 terminal.go:Flags() - 249ns
[TRACE] 23:19:25.272 terminal.go:GOOS() - 354ns
[TRACE] 23:19:25.272 terminal.go:GOOS() - 104ns
[TRACE] 23:19:25.272 terminal.go:Pwd() - 369ns
[TRACE] 23:19:25.272 terminal.go:Pwd() - 634ns
[DEBUG] 23:19:25.272 path.go:makeFolderFormatMap:844 → NO DATA
[TRACE] 23:19:25.272 terminal.go:GOOS() - 163ns
[TRACE] 23:19:25.272 terminal.go:GOOS() - 142ns
[TRACE] 23:19:25.272 terminal.go:Pwd() - 267ns
[DEBUG] 23:19:25.272 segment.go:SetEnabled:115 → segment: Root
[TRACE] 23:19:25.272 terminal.go:TemplateCache() - 1.071µs
[TRACE] 23:19:25.272 terminal.go:GOOS() - 130ns
[TRACE] 23:19:25.272 terminal.go:StackCount() - 441ns
[DEBUG] 23:19:25.272 segment.go:SetEnabled:115 → segment: Status
[TRACE] 23:19:25.272 terminal_unix.go:Root() - 2.255µs
[TRACE] 23:19:25.272 terminal.go:StatusCodes() - 559ns
[TRACE] 23:19:25.272 terminal_unix.go:DirIsWritable(/home/alexandre) - 13.433µs
[DEBUG] 23:19:25.272 text.go:Render:80 → rendering template: {{ .Code }}
[TRACE] 23:19:25.272 terminal.go:TemplateCache() - 358ns
[TRACE] 23:19:25.272 terminal.go:Flags() - 127ns
[TRACE] 23:19:25.273 terminal.go:TemplateCache() - 1.823µs
[DEBUG] 23:19:25.273 status.go:Enabled:42 → always_enabled: true
[TRACE] 23:19:25.273 terminal.go:TemplateCache() - 456ns
[DEBUG] 23:19:25.274 terminal.go:RunCommand:376 → NO DATA
[TRACE] 23:19:25.274 terminal.go:RunCommand(who am i) - 2.322739ms
[TRACE] 23:19:25.274 terminal.go:TemplateCache() - 824ns
[DEBUG] 23:19:25.274 text.go:Render:80 → rendering template:  CONFIG ERROR 
[TRACE] 23:19:25.274 terminal.go:Flags() - 282ns
[DEBUG] 23:19:25.274 text.go:Render:80 → rendering template:   {{ path .Path .Location }} 
[TRACE] 23:19:25.274 terminal.go:Flags() - 195ns
[DEBUG] 23:19:25.274 text.go:Render:80 → rendering template:  {{ if .SSHSession }} {{ end }}{{ .UserName }} 
[TRACE] 23:19:25.274 terminal.go:Flags() - 147ns
[TRACE] 23:19:25.276 terminal.go:TemplateCache() - 1.127µs
[TRACE] 23:19:25.277 terminal.go:TemplateCache() - 386ns
[DEBUG] 23:19:25.277 text.go:Render:80 → rendering template: powerline
[TRACE] 23:19:25.277 terminal.go:Flags() - 202ns
[DEBUG] 23:19:25.277 text.go:Render:80 → rendering template: powerline
[TRACE] 23:19:25.277 terminal.go:Flags() - 53ns
[DEBUG] 23:19:25.277 text.go:Render:80 → rendering template: diamond
[TRACE] 23:19:25.277 terminal.go:Flags() - 192ns
[DEBUG] 23:19:25.277 text.go:Render:80 → rendering template: powerline
[TRACE] 23:19:25.277 terminal.go:Flags() - 137ns
[DEBUG] 23:19:25.277 text.go:Render:80 → rendering template: p:red
[TRACE] 23:19:25.277 terminal.go:Flags() - 111ns
[DEBUG] 23:19:25.277 text.go:Render:80 → rendering template: diamond
[TRACE] 23:19:25.277 terminal.go:Flags() - 61ns
[DEBUG] 23:19:25.277 text.go:Render:80 → rendering template: p:red
[TRACE] 23:19:25.277 terminal.go:Flags() - 80ns
[TRACE] 23:19:25.277 terminal.go:Shell() - 212ns
[TRACE] 23:19:25.277 terminal.go:Shell() - 83ns
[TRACE] 23:19:25.277 terminal.go:Flags() - 160ns
[TRACE] 23:19:25.277 terminal.go:Flags() - 263ns
[TRACE] 23:19:25.277 terminal.go:Pwd() - 9.56µs
[TRACE] 23:19:25.277 terminal.go:GOOS() - 226ns
[TRACE] 23:19:25.277 terminal.go:Flags() - 187ns
[DEBUG] 23:19:25.277 segment.go:SetEnabled:115 → segment: Time
[TRACE] 23:19:25.277 terminal.go:Pwd() - 360ns
[DEBUG] 23:19:25.277 time.go:Enabled:29 → 15:04:05
[DEBUG] 23:19:25.277 python.go:Init:61 → files
[TRACE] 23:19:25.277 terminal.go:Pwd() - 362ns
[TRACE] 23:19:25.277 terminal.go:GOOS() - 122ns
[TRACE] 23:19:25.277 terminal.go:TemplateCache() - 328ns
[TRACE] 23:19:25.277 terminal.go:GOOS() - 131ns
[DEBUG] 23:19:25.277 segment.go:SetEnabled:115 → segment: Go
[DEBUG] 23:19:25.277 segment.go:SetEnabled:115 → segment: Node
[TRACE] 23:19:25.277 terminal.go:Pwd() - 282ns
[TRACE] 23:19:25.277 terminal.go:Flags() - 118ns
[TRACE] 23:19:25.277 terminal.go:GOOS() - 133ns
[TRACE] 23:19:25.277 terminal.go:Pwd() - 202ns
[DEBUG] 23:19:25.277 segment.go:SetEnabled:115 → segment: Python
[DEBUG] 23:19:25.277 language.go:Enabled:109 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .vue]
[TRACE] 23:19:25.277 terminal.go:GOOS() - 131ns
[DEBUG] 23:19:25.277 language.go:Enabled:109 → extensions: [*.go go.mod]
[DEBUG] 23:19:25.277 language.go:Enabled:110 → folders: []
[DEBUG] 23:19:25.277 segment.go:SetEnabled:115 → segment: Shell
[DEBUG] 23:19:25.277 language.go:Enabled:110 → folders: []
[DEBUG] 23:19:25.277 language.go:Enabled:117 → home_enabled: false
[DEBUG] 23:19:25.277 language.go:Enabled:109 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 23:19:25.277 language.go:Enabled:117 → home_enabled: false
[DEBUG] 23:19:25.277 shell.go:Enabled:28 → mapped_shell_names: map[]
[TRACE] 23:19:25.277 terminal.go:Pwd() - 219ns
[DEBUG] 23:19:25.277 language.go:Enabled:110 → folders: [.venv venv virtualenv venv-win pyenv-win]
[TRACE] 23:19:25.277 terminal.go:Shell() - 195ns
[DEBUG] 23:19:25.277 language.go:Enabled:117 → home_enabled: false
[TRACE] 23:19:25.277 terminal.go:Flags() - 103ns
[TRACE] 23:19:25.277 terminal.go:Pwd() - 288ns
[TRACE] 23:19:25.277 terminal.go:TemplateCache() - 227ns
[DEBUG] 23:19:25.278 text.go:Render:80 → rendering template: in <p:blue><b>{{ .Name }}</b></> 
[DEBUG] 23:19:25.278 text.go:Render:80 → rendering template: at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>
[TRACE] 23:19:25.278 terminal.go:Flags() - 164ns
[TRACE] 23:19:25.278 terminal.go:TemplateCache() - 442ns
[TRACE] 23:19:25.278 terminal.go:TemplateCache() - 289ns
[DEBUG] 23:19:25.278 text.go:Render:80 → rendering template: plain
[TRACE] 23:19:25.278 terminal.go:Flags() - 162ns
[DEBUG] 23:19:25.278 text.go:Render:80 → rendering template: plain
[TRACE] 23:19:25.278 terminal.go:Flags() - 101ns
[DEBUG] 23:19:25.278 text.go:Render:80 → rendering template: plain
[TRACE] 23:19:25.278 terminal.go:Flags() - 70ns
[DEBUG] 23:19:25.278 text.go:Render:80 → rendering template: plain
[TRACE] 23:19:25.278 terminal.go:Flags() - 81ns
[DEBUG] 23:19:25.278 text.go:Render:80 → rendering template: plain
[TRACE] 23:19:25.278 terminal.go:Flags() - 81ns
[TRACE] 23:19:25.278 terminal.go:Shell() - 117ns
[TRACE] 23:19:25.278 terminal.go:Shell() - 56ns
[TRACE] 23:19:25.278 terminal.go:Flags() - 58ns
[TRACE] 23:19:25.278 terminal.go:Shell() - 58ns
[TRACE] 23:19:25.278 terminal.go:Flags() - 57ns
[DEBUG] 23:19:25.278 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.278 terminal.go:Getenv(OMP_CACHE_DIR) - 6.986µs
[DEBUG] 23:19:25.278 terminal.go:Getenv:171 → NO DATA
[TRACE] 23:19:25.278 terminal.go:Getenv(XDG_CACHE_HOME) - 4.824µs
[TRACE] 23:19:25.278 terminal_unix.go:CachePath() - 50.025µs
[TRACE] 23:19:25.278 terminal.go:Flags() - 77ns
JanDeDobbeleer commented 1 month ago

@AlexAuragan it should always report the actual error, just checked in code it's rather strange that it's not in the logs as there are only 2 code paths to CONFIG ERROR which always have an error debug statement enabled. That said, it's two things:

Can you share the config file?

AlexAuragan commented 1 month ago
oh-my-posh config export --format toml --output ~/.config/oh-my-posh/test.toml  
cat .config/oh-my-posh/test.toml
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json

version = 2
final_space = true
console_title_template = '{{ .Shell }} in {{ .Folder }}'

[[blocks]]
  type = 'prompt'
  alignment = 'left'

  [[blocks.segments]]
    type = 'python'
    style = 'diamond'
    powerline_symbol = ''
    leading_diamond = '<p:green,transparent>'
    template = '{{ .Venv }}'
    background = 'p:green'
    foreground = 'p:black'
    Text = ''
    Duration = 0
    NameLength = 0

    [blocks.segments.properties]
      always_enabled = true

  [[blocks.segments]]
    type = 'path'
    style = 'powerline'
    powerline_symbol = ''
    template = '  {{ path .Path .Location }} '
    background = 'p:orange'
    foreground = 'p:black'
    Text = ''
    Duration = 0
    NameLength = 0

    [blocks.segments.properties]
      style = 'folder'

  [[blocks.segments]]
    type = 'git'
    style = 'powerline'
    powerline_symbol = ''
    foreground_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}', '{{ if gt .Ahead 0 }}p:white{{ end }}']
    background_templates = ['{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}', '{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}', '{{ if gt .Ahead 0 }}#49416D{{ end }}', '{{ if gt .Behind 0 }}#7A306C{{ end }}']
    template = ' {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }} '
    background = 'p:green'
    foreground = 'p:black'
    Text = ''
    Duration = 0
    NameLength = 0

    [blocks.segments.properties]
      branch_max_length = 25
      fetch_status = true
      fetch_upstream_icon = true

  [[blocks.segments]]
    type = 'root'
    style = 'powerline'
    powerline_symbol = ''
    template = '  '
    background = 'p:yellow'
    foreground = 'p:black'
    Text = ''
    Duration = 0
    NameLength = 0

  [[blocks.segments]]
    type = 'status'
    style = 'diamond'
    background_templates = ['{{ if gt .Code 0 }}p:red{{ end }}']
    leading_diamond = '<transparent,background></>'
    trailing_diamond = ''
    template = ' {{ if gt .Code 0 }}{{ else }}{{ end }} '
    background = 'p:blue'
    foreground = 'p:white'
    Text = ''
    Duration = 0
    NameLength = 0

    [blocks.segments.properties]
      always_enabled = true

[[blocks]]
  type = 'rprompt'

  [[blocks.segments]]
    type = 'node'
    style = 'plain'
    template = ' '
    background = 'transparent'
    foreground = 'p:green'
    Text = ''
    Duration = 0
    NameLength = 0

    [blocks.segments.properties]
      display_mode = 'files'
      fetch_package_manager = false
      home_enabled = false

  [[blocks.segments]]
    type = 'go'
    style = 'plain'
    template = ' '
    background = 'transparent'
    foreground = 'p:blue'
    Text = ''
    Duration = 0
    NameLength = 0

    [blocks.segments.properties]
      fetch_version = false

  [[blocks.segments]]
    type = 'python'
    style = 'plain'
    template = ' '
    background = 'transparent'
    foreground = 'p:yellow'
    Text = ''
    Duration = 0
    NameLength = 0

    [blocks.segments.properties]
      display_mode = 'files'
      fetch_version = false
      fetch_virtual_env = false

  [[blocks.segments]]
    type = 'shell'
    style = 'plain'
    template = 'in <p:blue><b>{{ .Name }}</b></> '
    background = 'transparent'
    foreground = 'p:white'
    Text = ''
    Duration = 0
    NameLength = 0

  [[blocks.segments]]
    type = 'time'
    style = 'plain'
    template = 'at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>'
    background = 'transparent'
    foreground = 'p:white'
    Text = ''
    Duration = 0
    NameLength = 0

[[tooltips]]
  type = 'aws'
  tips = ['aws']
  style = 'diamond'
  leading_diamond = ''
  trailing_diamond = ''
  template = '  {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} '
  background = 'p:orange'
  foreground = 'p:white'
  Text = ''
  Duration = 0
  NameLength = 0

  [tooltips.properties]
    display_default = true

[[tooltips]]
  type = 'az'
  tips = ['az']
  style = 'diamond'
  leading_diamond = ''
  trailing_diamond = ''
  template = '  {{ .Name }} '
  background = 'p:blue'
  foreground = 'p:white'
  Text = ''
  Duration = 0
  NameLength = 0

  [tooltips.properties]
    display_default = true

[transient_prompt]
  template = '<p:yellow,transparent></><,p:yellow> {{ .Folder }} </><p:yellow,transparent></> '
  background = 'transparent'
  foreground = 'p:black'
  Text = ''
  Duration = 0
  NameLength = 0

[secondary_prompt]
  template = '<p:yellow,transparent></><,p:yellow> > </><p:yellow,transparent></> '
  background = 'transparent'
  foreground = 'p:black'
  Text = ''
  Duration = 0
  NameLength = 0

[palette]
  black = '#1e1e2e'
  blue = '#89b4fa   '
  green = '#a6e3a1'
  orange = '#fab387'
  red = '#f38ba8'
  white = '#cdd6f4'
  yellow = '#f9e2af'

after a bit of debug I found out that replacing the first line with "$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" solves the issue for me

JanDeDobbeleer commented 1 month ago

OK, I'll fix that!

JanDeDobbeleer commented 1 month ago

Fixed in latest