Closed AlexAuragan closed 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?
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
OK, I'll fix that!
Fixed in latest
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 didoh-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 toeval "$(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