JanDeDobbeleer / oh-my-posh

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

24.0.11 prints 'default@eu-central-1' in 'aws' type segment #5848

Closed stheine closed 2 weeks ago

stheine commented 2 weeks ago

Code of Conduct

What happened?

I use this segment code for displaying what AWS system I am talking to:

        {
          "style": "plain",
          "foreground": "black",
          "type": "aws",
          "background_templates": [
            "{{if contains \"232953457963\" .Profile}}#00ff00{{end}}",
            "{{if contains \"930417160920\" .Profile}}#00ffff{{end}}",
            "{{if contains \"141575347758\" .Profile}}#ffff00{{end}}"
          ],
          "templates": [
            "{{if contains \"232953457963\" .Profile}}AWS prod<inherit,transparent> </>{{end}}",
            "{{if contains \"930417160920\" .Profile}}AWS stage<inherit,transparent> </>{{end}}",
            "{{if contains \"141575347758\" .Profile}}AWS dev<inherit,transparent> </>{{end}}"
          ]
        },

After today's update to 24.0.11, this is printing default@eu-central-1 even if none of my template conditions is matching. this hasn't been the case in earlier versions.

Theme

my own one - relevant section above

What OS are you seeing the problem on?

Linux

Which shell are you using?

bash

Log output

a300 ~  default@eu-central-1 $ oh-my-posh debug bash --plain

Version: 24.0.11

Shell: bash (5.2.21(1)-release)

Prompt:

a300 ~  default@eu-central-1 $ 

Segments:

ConsoleTitle(true)                        -   0 ms
Session(true)                             -   2 ms
Exit(false)                               -   0 ms
Path(true)                                -   1 ms
Aws(true)                                 -   1 ms
Text(false)                               -   0 ms
Text(false)                               -   0 ms
Text(true)                                -   0 ms

Run duration: 5.012942ms

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

Config path: /home/stheine/.poshthemes/stheine.omp.json

Logs:

[DEBUG] 16:16:45.632 debug.go:49 → debug mode enabled
[DEBUG] 16:16:45.632 debug.go:49 → plain mode enabled
[DEBUG] 16:16:45.632 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.632 terminal.go:Getenv(LOCALAPPDATA) - 19.206µs
[DEBUG] 16:16:45.632 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.632 terminal.go:Getenv(OMP_CACHE_DIR) - 5.308µs
[DEBUG] 16:16:45.632 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.632 terminal.go:Getenv(XDG_CACHE_HOME) - 7.054µs
[TRACE] 16:16:45.632 terminal.go:CachePath() - 72.915µs
[DEBUG] 16:16:45.632 terminal.go:65 → loading cache file: /home/stheine/.cache/oh-my-posh/omp.cache
[DEBUG] 16:16:45.632 terminal.go:65 → loading cache key: environment_platform
[DEBUG] 16:16:45.632 terminal.go:65 → loading cache key: is_wsl
[TRACE] 16:16:45.632 terminal.go(/home/stheine/.cache/oh-my-posh/omp.cache) - 102.317µs
[DEBUG] 16:16:45.632 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.632 terminal.go:Getenv(LOCALAPPDATA) - 6.705µs
[DEBUG] 16:16:45.632 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.633 terminal.go:Getenv(OMP_CACHE_DIR) - 6.216µs
[DEBUG] 16:16:45.633 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.633 terminal.go:Getenv(XDG_CACHE_HOME) - 5.238µs
[TRACE] 16:16:45.633 terminal.go:CachePath() - 55.315µs
[DEBUG] 16:16:45.633 terminal.go:65 → loading cache file: /home/stheine/.cache/oh-my-posh/omp.cache.9a16d679-f3af-4c68-a8aa-78d25a8e2cf7
[DEBUG] 16:16:45.633 terminal.go:65 → loading cache key: prompt_count_cache
[TRACE] 16:16:45.633 terminal.go(/home/stheine/.cache/oh-my-posh/omp.cache.9a16d679-f3af-4c68-a8aa-78d25a8e2cf7) - 59.155µs
[TRACE] 16:16:45.633 terminal.go:setPromptCount() - 1.886µs
[TRACE] 16:16:45.633 terminal.go:GOOS() - 1.397µs
[DEBUG] 16:16:45.633 terminal.go:setPwd:194 → /home/stheine
[TRACE] 16:16:45.633 terminal.go:setPwd() - 20.464µs
[DEBUG] 16:16:45.633 terminal.go:Getenv:161 → /home/stheine/.poshthemes/stheine.omp.json
[TRACE] 16:16:45.633 terminal.go:Getenv(POSH_THEME) - 6.286µs
[DEBUG] 16:16:45.633 terminal.go:ResolveConfigPath:93 → config set using POSH_THEME: /home/stheine/.poshthemes/stheine.omp.json
[TRACE] 16:16:45.633 terminal.go:ResolveConfigPath() - 23.816µs
[TRACE] 16:16:45.633 terminal.go:Init() - 490.985µs
[TRACE] 16:16:45.633 terminal.go:Shell() - 1.396µs
[TRACE] 16:16:45.633 terminal.go:Flags() - 908ns
[TRACE] 16:16:45.634 load.go:loadConfig() - 787.183µs
[TRACE] 16:16:45.634 terminal.go:Flags() - 908ns
[DEBUG] 16:16:45.634 debug.go:59 → terminal program: Unknown
[DEBUG] 16:16:45.634 debug.go:59 → terminal shell: bash
[DEBUG] 16:16:45.634 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.634 terminal.go:Getenv(OMP_CACHE_DISABLED) - 5.587µs
[TRACE] 16:16:45.634 colors.go:SetAccentColor() - 2.375µs
[TRACE] 16:16:45.634 terminal.go:Shell() - 1.467µs
[DEBUG] 16:16:45.634 terminal.go:Getenv:161 → 5.2.21(1)-release
[TRACE] 16:16:45.634 terminal.go:Getenv(POSH_SHELL_VERSION) - 5.797µs
[DEBUG] 16:16:45.634 debug.go:PrintDebug:23 → segment: Title
[TRACE] 16:16:45.634 terminal_unix.go:Root() - 1.885µs
[TRACE] 16:16:45.634 terminal.go:Shell() - 1.397µs
[TRACE] 16:16:45.634 terminal.go:StatusCodes() - 977ns
[DEBUG] 16:16:45.634 terminal_unix.go:IsWsl:35 → false
[TRACE] 16:16:45.634 terminal_unix.go:IsWsl() - 11.384µs
[DEBUG] 16:16:45.634 terminal_unix.go:IsWsl:35 → false
[TRACE] 16:16:45.634 terminal_unix.go:IsWsl() - 5.867µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 terminal.go:GOOS() - 1.466µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 terminal.go:GOOS() - 908ns
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 977ns
[DEBUG] 16:16:45.634 terminal.go:User:331 → stheine
[TRACE] 16:16:45.634 terminal.go:User() - 6.077µs
[DEBUG] 16:16:45.634 terminal.go:Host:348 → a300
[TRACE] 16:16:45.634 terminal.go:Host() - 7.054µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 908ns
[DEBUG] 16:16:45.634 terminal_unix.go:Platform:95 → ubuntu
[DEBUG] 16:16:45.634 terminal.go:Getenv:161 → 1
[TRACE] 16:16:45.634 terminal.go:Getenv(SHLVL) - 5.727µs
[TRACE] 16:16:45.634 terminal.go:TemplateCache() - 184.591µs
[TRACE] 16:16:45.634 text.go:Render({{if eq "stheine_ot" .UserName}}js{{else}}{{.HostName}}{{end}}) - 535.964µs
[TRACE] 16:16:45.634 terminal.go:Flags() - 908ns
[DEBUG] 16:16:45.634 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.634 terminal.go:Getenv(POSH_CURSOR_LINE) - 5.378µs
[DEBUG] 16:16:45.634 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.634 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 5.169µs
[TRACE] 16:16:45.634 terminal.go:Flags() - 13.898µs
[TRACE] 16:16:45.634 terminal.go:Flags() - 908ns
[TRACE] 16:16:45.634 terminal.go:Flags() - 978ns
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 terminal.go:Flags() - 1.466µs
[DEBUG] 16:16:45.634 segment.go:Execute:108 → segment: Text
[TRACE] 16:16:45.634 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.634 terminal.go:TemplateCache() - 1.397µs
[DEBUG] 16:16:45.634 segment.go:Execute:108 → segment: Path
[TRACE] 16:16:45.634 terminal.go:Flags() - 1.467µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 1.397µs
[DEBUG] 16:16:45.634 path.go:145 → display_cygpath: false
[DEBUG] 16:16:45.634 segment.go:Execute:108 → segment: Text
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 terminal.go:TemplateCache() - 1.397µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 977ns
[TRACE] 16:16:45.634 terminal.go:PathSeparator() - 9.499µs
[TRACE] 16:16:45.634 terminal.go:Flags() - 978ns
[TRACE] 16:16:45.634 terminal.go:Shell() - 977ns
[TRACE] 16:16:45.634 terminal.go:Shell() - 1.467µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 977ns
[DEBUG] 16:16:45.634 segment.go:Execute:108 → segment: Exit
[TRACE] 16:16:45.634 terminal.go:Flags() - 1.397µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 terminal.go:StatusCodes() - 978ns
[DEBUG] 16:16:45.634 status.go:formatStatus:45 → {{ .Code }}
[DEBUG] 16:16:45.634 path.go:setMappedLocations:552 → mapped_locations_enabled: true
[DEBUG] 16:16:45.634 path.go:setMappedLocations:553 → 
[DEBUG] 16:16:45.634 path.go:setMappedLocations:554 → 
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.634 text.go:Render({{ .Code }}) - 28.635µs
[DEBUG] 16:16:45.634 segment.go:Execute:108 → segment: Text
[DEBUG] 16:16:45.634 status.go:Enabled:37 → always_enabled: false
[TRACE] 16:16:45.634 terminal.go:TemplateCache() - 1.397µs
[TRACE] 16:16:45.634 terminal.go:Flags() - 1.397µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.634 terminal.go:PathSeparator() - 33.803µs
[TRACE] 16:16:45.634 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.466µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 977ns
[DEBUG] 16:16:45.635 path.go:setMappedLocations:555 → ~
[DEBUG] 16:16:45.635 segment.go:Execute:108 → segment: Session
[DEBUG] 16:16:45.635 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.635 terminal.go:Getenv(SSH_CONNECTION) - 13.06µs
[DEBUG] 16:16:45.635 path.go:setMappedLocations:560 → mapped_locations: map[/home/stheine:/home/stheine /home/stheine/js:js /home/stheine_ot:/home/stheine_ot]
[DEBUG] 16:16:45.635 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.635 terminal.go:Getenv(SSH_CLIENT) - 6.146µs
[TRACE] 16:16:45.635 text.go:Render(/home/stheine_ot) - 978ns
[TRACE] 16:16:45.635 terminal.go:Flags() - 978ns
[TRACE] 16:16:45.635 terminal.go:GOOS() - 24.305µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.635 terminal.go:PathSeparator() - 36.318µs
[DEBUG] 16:16:45.635 terminal_unix.go:Platform:95 → ubuntu
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.466µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.635 terminal.go:PathSeparator() - 49.517µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 908ns
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.635 text.go:Render(/home/stheine) - 1.886µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.635 terminal.go:PathSeparator() - 8.66µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.635 text.go:Render(/home/stheine/js) - 1.467µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 978ns
[TRACE] 16:16:45.635 terminal.go:PathSeparator() - 21.022µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.396µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.466µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.955µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.635 terminal.go:PathSeparator() - 9.01µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 977ns
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.635 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.635 terminal.go:PathSeparator() - 10.406µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 908ns
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.467µs
[TRACE] 16:16:45.636 terminal.go:TemplateCache() - 1.467µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.396µs
[TRACE] 16:16:45.636 terminal.go:PathSeparator() - 9.359µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.636 text.go:Render({{if contains "232953457963" .Profile}}AWS prod<inherit,transparent> </>{{end}}) - 1.005857ms
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.466µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.466µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.955µs
[TRACE] 16:16:45.636 text.go:Render({{if contains "930417160920" .Profile}}AWS stage<inherit,transparent> </>{{end}}) - 24.724µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.636 text.go:Render({{if contains "141575347758" .Profile}}AWS dev<inherit,transparent> </>{{end}}) - 20.883µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.466µs
[TRACE] 16:16:45.636 terminal.go:GOOS() - 908ns
[TRACE] 16:16:45.636 terminal.go:Flags() - 1.397µs
[DEBUG] 16:16:45.636 aws.go:Enabled:35 → display_default: true
[DEBUG] 16:16:45.636 terminal.go:Getenv:161 → NO DATA
[DEBUG] 16:16:45.636 path.go:colorizePath:728 → cycle: []
[DEBUG] 16:16:45.636 path.go:getFolderSeparator:263 → NO DATA
[TRACE] 16:16:45.636 terminal.go:Getenv(AWS_VAULT) - 6.775µs
[DEBUG] 16:16:45.636 path.go:getFolderSeparator:265 → /
[DEBUG] 16:16:45.636 terminal.go:Getenv:161 → NO DATA
[DEBUG] 16:16:45.636 path.go:colorizePath:731 → cycle_folder_separator: false
[TRACE] 16:16:45.636 terminal.go:Getenv(AWS_DEFAULT_PROFILE) - 6.216µs
[DEBUG] 16:16:45.636 path.go:colorizePath:732 → %s
[DEBUG] 16:16:45.636 path.go:colorizePath:734 → %s
[DEBUG] 16:16:45.636 terminal.go:Getenv:161 → NO DATA
[DEBUG] 16:16:45.636 path.go:colorizePath:735 → %s
[TRACE] 16:16:45.636 terminal.go:Getenv(AWS_PROFILE) - 6.356µs
[DEBUG] 16:16:45.636 path.go:colorizePath:736 → %s
[DEBUG] 16:16:45.636 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.636 terminal.go:Getenv(AWS_REGION) - 5.168µs
[TRACE] 16:16:45.636 terminal.go:TemplateCache() - 1.397µs
[DEBUG] 16:16:45.636 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.636 terminal.go:GOOS() - 1.397µs
[TRACE] 16:16:45.636 terminal.go:Getenv(AWS_DEFAULT_REGION) - 5.168µs
[DEBUG] 16:16:45.636 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.636 terminal.go:Getenv(AWS_CONFIG_FILE) - 5.797µs
[TRACE] 16:16:45.636 terminal.go:StackCount() - 1.467µs
[TRACE] 16:16:45.636 terminal_unix.go:DirIsWritable(/home/stheine) - 10.965µs
[TRACE] 16:16:45.636 terminal.go:TemplateCache() - 1.467µs
[DEBUG] 16:16:45.636 terminal.go:FileContent:302 ↓
    [default]
    region = eu-central-1
    [profile 232953457963_Fed_Account_Admin]

[TRACE] 16:16:45.636 terminal.go:FileContent(/home/stheine/.aws/config) - 45.327µs
[TRACE] 16:16:45.636 terminal.go:TemplateCache() - 1.467µs
[DEBUG] 16:16:45.637 terminal.go:RunCommand:371 → NO DATA
[TRACE] 16:16:45.637 terminal.go:RunCommand(who am i) - 1.704691ms
[TRACE] 16:16:45.637 terminal.go:TemplateCache() - 1.886µs
[TRACE] 16:16:45.637 text.go:Render({{ if .SSHSession }} {{ end }}{{if eq "stheine_ot" .UserName}}OT{{else}}{{ .HostName }}{{end}} ) - 50.844µs
[TRACE] 16:16:45.637 text.go:Render(plain) - 1.397µs
[TRACE] 16:16:45.637 text.go:Render(diamond) - 978ns
[TRACE] 16:16:45.637 text.go:Render({{ .Path }}) - 15.295µs
[TRACE] 16:16:45.637 text.go:Render(diamond) - 1.397µs
[TRACE] 16:16:45.637 text.go:Render( {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ) - 16.552µs
[TRACE] 16:16:45.637 text.go:Render({{if contains "232953457963" .Profile}}#00ff00{{end}}) - 19.485µs
[TRACE] 16:16:45.637 text.go:Render({{if contains "930417160920" .Profile}}#00ffff{{end}}) - 13.898µs
[TRACE] 16:16:45.637 text.go:Render({{if contains "141575347758" .Profile}}#ffff00{{end}}) - 14.388µs
[TRACE] 16:16:45.637 text.go:Render(plain) - 978ns
[TRACE] 16:16:45.637 text.go:Render({{if contains "232953457963" .Profile}}#00ff00{{end}}) - 11.105µs
[TRACE] 16:16:45.637 text.go:Render({{if contains "930417160920" .Profile}}#00ffff{{end}}) - 19.276µs
[TRACE] 16:16:45.637 text.go:Render({{if contains "141575347758" .Profile}}#ffff00{{end}}) - 21.511µs
[DEBUG] 16:16:45.637 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.637 terminal.go:Getenv(ENVIRONMENT_PROMPT) - 6.775µs
[TRACE] 16:16:45.637 text.go:Render({{if .Env.ENVIRONMENT_PROMPT}}{{.Env.ENVIRONMENT_PROMPT}}<inherit,transparent> </>{{end}}) - 50.636µs
[TRACE] 16:16:45.637 terminal.go:TemplateCache() - 1.397µs
[TRACE] 16:16:45.637 text.go:Render(plain) - 1.397µs
[DEBUG] 16:16:45.637 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.637 terminal.go:Getenv(DOCKER_PROMPT) - 5.727µs
[TRACE] 16:16:45.637 text.go:Render({{if .Env.DOCKER_PROMPT}}{{.Env.DOCKER_PROMPT}}<inherit,transparent> </>{{end}}) - 30.032µs
[TRACE] 16:16:45.637 terminal.go:TemplateCache() - 978ns
[TRACE] 16:16:45.637 text.go:Render(plain) - 1.467µs
[TRACE] 16:16:45.637 text.go:Render($ ) - 978ns
[TRACE] 16:16:45.637 text.go:Render(plain) - 1.396µs
[TRACE] 16:16:45.637 terminal.go:Shell() - 978ns
[TRACE] 16:16:45.637 terminal.go:Shell() - 1.467µs
[TRACE] 16:16:45.637 terminal.go:Flags() - 1.467µs
[TRACE] 16:16:45.637 terminal.go:Shell() - 908ns
[DEBUG] 16:16:45.637 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.637 terminal.go:Getenv(LOCALAPPDATA) - 7.683µs
[DEBUG] 16:16:45.637 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.637 terminal.go:Getenv(OMP_CACHE_DIR) - 5.587µs
[DEBUG] 16:16:45.637 terminal.go:Getenv:161 → NO DATA
[TRACE] 16:16:45.637 terminal.go:Getenv(XDG_CACHE_HOME) - 5.727µs
[TRACE] 16:16:45.637 terminal.go:CachePath() - 68.305µs
[TRACE] 16:16:45.637 terminal.go:Flags() - 908ns
a300 ~  default@eu-central-1 $
JanDeDobbeleer commented 2 weeks ago

I'l have a look, templates was refactored and highly likely something is missing now. I can see it still loads the default template as well which is why this is the case.

stheine commented 2 weeks ago

hmmm. I'm on 24.1.0 now, but it's still behaving the same.

a300 ~  default@eu-central-1 $ oh-my-posh version
24.1.0
a300 ~  default@eu-central-1 $ 

am I doing something wrong, or is it still buggy?

JanDeDobbeleer commented 2 weeks ago

@stheine I'mm double check. Didn't do an integration check. Care to share the logs as well?

stheine commented 2 weeks ago

here the log with the lastest version:

a300   1  ~/.poshthemes  default@eu-central-1 $ oh-my-posh debug bash --plain

Version: 24.1.0

Shell: bash (5.2.21(1)-release)

Prompt:

a300 ~/.poshthemes  default@eu-central-1 $ 

Segments:

ConsoleTitle(true)                        -   0 ms
Session(true)                             -   2 ms
Exit(false)                               -   0 ms
Path(true)                                -   1 ms
Aws(true)                                 -   0 ms
Text(false)                               -   0 ms
Text(false)                               -   0 ms
Text(true)                                -   0 ms

Run duration: 5.353488ms

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

Config path: /home/stheine/.poshthemes/stheine.omp.json

Logs:

[DEBUG] 07:46:39.142 debug.go:49 → debug mode enabled
[DEBUG] 07:46:39.142 debug.go:49 → plain mode enabled
[DEBUG] 07:46:39.142 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.142 terminal.go:Getenv(LOCALAPPDATA) - 384.966µs
[DEBUG] 07:46:39.142 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.142 terminal.go:Getenv(OMP_CACHE_DIR) - 5.657µs
[DEBUG] 07:46:39.142 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.142 terminal.go:Getenv(XDG_CACHE_HOME) - 5.238µs
[TRACE] 07:46:39.142 terminal.go:CachePath() - 449.43µs
[DEBUG] 07:46:39.142 terminal.go:65 → loading cache file: /home/stheine/.cache/oh-my-posh/omp.cache
[DEBUG] 07:46:39.142 terminal.go:65 → loading cache key: environment_platform
[DEBUG] 07:46:39.142 terminal.go:65 → loading cache key: is_wsl
[TRACE] 07:46:39.142 terminal.go(/home/stheine/.cache/oh-my-posh/omp.cache) - 76.616µs
[DEBUG] 07:46:39.142 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.142 terminal.go:Getenv(LOCALAPPDATA) - 5.587µs
[DEBUG] 07:46:39.142 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.142 terminal.go:Getenv(OMP_CACHE_DIR) - 5.308µs
[DEBUG] 07:46:39.142 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.142 terminal.go:Getenv(XDG_CACHE_HOME) - 5.098µs
[TRACE] 07:46:39.142 terminal.go:CachePath() - 67.537µs
[DEBUG] 07:46:39.142 terminal.go:65 → loading cache file: /home/stheine/.cache/oh-my-posh/omp.cache.8b0b853d-a26e-4449-9c88-c8e866b849ac
[DEBUG] 07:46:39.142 terminal.go:65 → loading cache key: prompt_count_cache
[TRACE] 07:46:39.142 terminal.go(/home/stheine/.cache/oh-my-posh/omp.cache.8b0b853d-a26e-4449-9c88-c8e866b849ac) - 37.575µs
[TRACE] 07:46:39.142 terminal.go:setPromptCount() - 1.466µs
[TRACE] 07:46:39.142 terminal.go:GOOS() - 908ns
[DEBUG] 07:46:39.142 terminal.go:setPwd:194 → /home/stheine/.poshthemes
[TRACE] 07:46:39.142 terminal.go:setPwd() - 18.927µs
[DEBUG] 07:46:39.142 terminal.go:Getenv:161 → /home/stheine/.poshthemes/stheine.omp.json
[TRACE] 07:46:39.142 terminal.go:Getenv(POSH_THEME) - 5.797µs
[DEBUG] 07:46:39.142 terminal.go:ResolveConfigPath:93 → config set using POSH_THEME: /home/stheine/.poshthemes/stheine.omp.json
[TRACE] 07:46:39.142 terminal.go:ResolveConfigPath() - 20.952µs
[TRACE] 07:46:39.142 terminal.go:Init() - 842.009µs
[TRACE] 07:46:39.142 terminal.go:Shell() - 977ns
[TRACE] 07:46:39.142 terminal.go:Flags() - 978ns
[TRACE] 07:46:39.143 load.go:loadConfig() - 754.986µs
[TRACE] 07:46:39.143 terminal.go:Flags() - 978ns
[DEBUG] 07:46:39.143 debug.go:59 → terminal program: Unknown
[DEBUG] 07:46:39.143 debug.go:59 → terminal shell: bash
[DEBUG] 07:46:39.143 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.143 terminal.go:Getenv(OMP_CACHE_DISABLED) - 14.457µs
[TRACE] 07:46:39.143 colors.go:SetAccentColor() - 1.397µs
[TRACE] 07:46:39.143 terminal.go:Shell() - 908ns
[DEBUG] 07:46:39.143 terminal.go:Getenv:161 → 5.2.21(1)-release
[TRACE] 07:46:39.143 terminal.go:Getenv(POSH_SHELL_VERSION) - 6.076µs
[DEBUG] 07:46:39.143 debug.go:PrintDebug:23 → segment: Title
[TRACE] 07:46:39.144 terminal_unix.go:Root() - 977ns
[TRACE] 07:46:39.144 terminal.go:Shell() - 1.396µs
[TRACE] 07:46:39.144 terminal.go:StatusCodes() - 1.397µs
[DEBUG] 07:46:39.144 terminal_unix.go:IsWsl:35 → false
[TRACE] 07:46:39.144 terminal_unix.go:IsWsl() - 16.762µs
[DEBUG] 07:46:39.144 terminal_unix.go:IsWsl:35 → false
[TRACE] 07:46:39.144 terminal_unix.go:IsWsl() - 6.216µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 908ns
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.466µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.144 terminal.go:GOOS() - 977ns
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.144 terminal.go:GOOS() - 908ns
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 978ns
[DEBUG] 07:46:39.144 terminal.go:User:331 → stheine
[TRACE] 07:46:39.144 terminal.go:User() - 6.495µs
[DEBUG] 07:46:39.144 terminal.go:Host:348 → a300
[TRACE] 07:46:39.144 terminal.go:Host() - 7.753µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 978ns
[DEBUG] 07:46:39.144 terminal_unix.go:Platform:95 → ubuntu
[DEBUG] 07:46:39.144 terminal.go:Getenv:161 → 1
[TRACE] 07:46:39.144 terminal.go:Getenv(SHLVL) - 6.286µs
[TRACE] 07:46:39.144 terminal.go:TemplateCache() - 245.423µs
[TRACE] 07:46:39.144 text.go:Render({{if eq "stheine_ot" .UserName}}js{{else}}{{.HostName}}{{end}}) - 546.928µs
[TRACE] 07:46:39.144 terminal.go:Flags() - 908ns
[DEBUG] 07:46:39.144 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.144 terminal.go:Getenv(POSH_CURSOR_LINE) - 5.797µs
[DEBUG] 07:46:39.144 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.144 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 5.727µs
[TRACE] 07:46:39.144 terminal.go:Flags() - 1.397µs
[TRACE] 07:46:39.144 terminal.go:Flags() - 1.466µs
[TRACE] 07:46:39.144 terminal.go:Flags() - 908ns
[TRACE] 07:46:39.144 terminal.go:GOOS() - 978ns
[DEBUG] 07:46:39.144 segment.go:Execute:108 → segment: Text
[TRACE] 07:46:39.144 terminal.go:Flags() - 1.886µs
[TRACE] 07:46:39.144 terminal.go:Flags() - 977ns
[DEBUG] 07:46:39.144 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.144 terminal.go:Getenv(SSH_CONNECTION) - 11.314µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.397µs
[DEBUG] 07:46:39.144 segment.go:Execute:108 → segment: Text
[DEBUG] 07:46:39.144 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.144 terminal.go:Getenv(SSH_CLIENT) - 5.308µs
[DEBUG] 07:46:39.144 terminal_unix.go:Platform:95 → ubuntu
[TRACE] 07:46:39.144 terminal.go:Flags() - 1.885µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.397µs
[DEBUG] 07:46:39.144 segment.go:Execute:108 → segment: Text
[TRACE] 07:46:39.144 terminal.go:Flags() - 1.466µs
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.397µs
[DEBUG] 07:46:39.144 segment.go:Execute:108 → segment: Exit
[TRACE] 07:46:39.144 terminal.go:StatusCodes() - 1.397µs
[DEBUG] 07:46:39.144 status.go:formatStatus:45 → {{ .Code }}
[TRACE] 07:46:39.144 terminal.go:Flags() - 1.466µs
[TRACE] 07:46:39.144 text.go:Render({{ .Code }}) - 37.086µs
[DEBUG] 07:46:39.144 status.go:Enabled:37 → always_enabled: false
[TRACE] 07:46:39.144 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.144 terminal.go:Flags() - 1.467µs
[DEBUG] 07:46:39.144 segment.go:Execute:108 → segment: Aws
[DEBUG] 07:46:39.144 aws.go:Enabled:35 → display_default: true
[TRACE] 07:46:39.144 terminal.go:GOOS() - 1.956µs
[DEBUG] 07:46:39.144 terminal.go:Getenv:161 → NO DATA
[DEBUG] 07:46:39.144 segment.go:Execute:108 → segment: Path
[TRACE] 07:46:39.144 terminal.go:Getenv(AWS_VAULT) - 7.054µs
[DEBUG] 07:46:39.144 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.145 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.145 terminal.go:Getenv(AWS_DEFAULT_PROFILE) - 409.201µs
[DEBUG] 07:46:39.145 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.145 terminal.go:Getenv(AWS_PROFILE) - 9.08µs
[DEBUG] 07:46:39.145 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.145 terminal.go:GOOS() - 35.27µs
[TRACE] 07:46:39.145 terminal.go:PathSeparator() - 53.778µs
[TRACE] 07:46:39.145 terminal.go:Shell() - 978ns
[TRACE] 07:46:39.145 terminal.go:Shell() - 978ns
[TRACE] 07:46:39.145 terminal.go:GOOS() - 978ns
[DEBUG] 07:46:39.145 path.go:setMappedLocations:552 → mapped_locations_enabled: true
[DEBUG] 07:46:39.145 path.go:setMappedLocations:553 → 
[TRACE] 07:46:39.145 terminal.go:Getenv(AWS_REGION) - 6.215µs
[DEBUG] 07:46:39.145 path.go:setMappedLocations:554 → 
[DEBUG] 07:46:39.145 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.145 terminal.go:Getenv(AWS_DEFAULT_REGION) - 8.101µs
[DEBUG] 07:46:39.145 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.145 terminal.go:GOOS() - 1.816µs
[TRACE] 07:46:39.145 terminal.go:Getenv(AWS_CONFIG_FILE) - 5.657µs
[TRACE] 07:46:39.145 terminal.go:PathSeparator() - 20.743µs
[TRACE] 07:46:39.145 terminal.go:GOOS() - 1.397µs
[DEBUG] 07:46:39.145 terminal.go:FileContent:302 ↓
    [default]
    region = eu-central-1
    [profile 232953457963_Fed_Account_Admin]

[TRACE] 07:46:39.145 terminal.go:FileContent(/home/stheine/.aws/config) - 76.616µs
[TRACE] 07:46:39.145 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.145 terminal.go:GOOS() - 978ns
[DEBUG] 07:46:39.145 path.go:setMappedLocations:555 → ~
[DEBUG] 07:46:39.145 path.go:setMappedLocations:560 → mapped_locations: map[/home/stheine:/home/stheine /home/stheine/js:js /home/stheine_ot:/home/stheine_ot]
[TRACE] 07:46:39.145 text.go:Render(/home/stheine_ot) - 1.467µs
[TRACE] 07:46:39.145 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.145 terminal.go:PathSeparator() - 10.616µs
[TRACE] 07:46:39.145 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.145 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.145 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.145 terminal.go:GOOS() - 1.396µs
[TRACE] 07:46:39.146 terminal.go:PathSeparator() - 11.873µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 908ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.466µs
[TRACE] 07:46:39.146 text.go:Render(/home/stheine) - 1.467µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.146 terminal.go:PathSeparator() - 8.731µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.466µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.146 text.go:Render(/home/stheine/js) - 1.886µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.146 terminal.go:PathSeparator() - 9.708µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 908ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 907ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.146 terminal.go:PathSeparator() - 8.52µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.466µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 908ns
[TRACE] 07:46:39.146 terminal.go:PathSeparator() - 9.708µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 977ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.466µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.396µs
[TRACE] 07:46:39.146 terminal.go:PathSeparator() - 12.222µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 908ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 908ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.467µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 908ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 978ns
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.397µs
[DEBUG] 07:46:39.146 path.go:makeFolderFormatMap:827 → NO DATA
[TRACE] 07:46:39.146 terminal.go:GOOS() - 978ns
[DEBUG] 07:46:39.146 path.go:setStyle:209 → agnoster_short
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.396µs
[DEBUG] 07:46:39.146 path.go:getAgnosterShortPath:495 → max_depth: 3
[DEBUG] 07:46:39.146 path.go:getAgnosterShortPath:501 → hide_root_location: false
[DEBUG] 07:46:39.146 path.go:getAgnosterShortPath:502 → ..
[TRACE] 07:46:39.146 terminal.go:GOOS() - 978ns
[DEBUG] 07:46:39.146 path.go:colorizePath:728 → cycle: []
[DEBUG] 07:46:39.146 path.go:getFolderSeparator:263 → NO DATA
[DEBUG] 07:46:39.146 path.go:getFolderSeparator:265 → /
[DEBUG] 07:46:39.146 path.go:colorizePath:731 → cycle_folder_separator: false
[DEBUG] 07:46:39.146 path.go:colorizePath:732 → %s
[DEBUG] 07:46:39.146 path.go:colorizePath:734 → %s
[DEBUG] 07:46:39.146 path.go:colorizePath:735 → %s
[DEBUG] 07:46:39.146 path.go:colorizePath:736 → %s
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.146 terminal.go:TemplateCache() - 1.467µs
[TRACE] 07:46:39.146 terminal.go:GOOS() - 1.397µs
[TRACE] 07:46:39.146 terminal.go:StackCount() - 1.397µs
[DEBUG] 07:46:39.146 terminal.go:RunCommand:371 → NO DATA
[TRACE] 07:46:39.146 terminal.go:RunCommand(who am i) - 1.969879ms
[TRACE] 07:46:39.146 terminal_unix.go:DirIsWritable(/home/stheine/.poshthemes) - 6.146µs
[TRACE] 07:46:39.146 terminal.go:TemplateCache() - 1.885µs
[TRACE] 07:46:39.146 text.go:Render({{ if .SSHSession }} {{ end }}{{if eq "stheine_ot" .UserName}}OT{{else}}{{ .HostName }}{{end}} ) - 249.404µs
[TRACE] 07:46:39.146 terminal.go:TemplateCache() - 1.397µs
[TRACE] 07:46:39.146 text.go:Render(plain) - 1.466µs
[TRACE] 07:46:39.146 text.go:Render(diamond) - 1.466µs
[TRACE] 07:46:39.146 text.go:Render({{ .Path }}) - 12.222µs
[TRACE] 07:46:39.146 terminal.go:TemplateCache() - 1.466µs
[TRACE] 07:46:39.146 text.go:Render(diamond) - 978ns
[TRACE] 07:46:39.146 text.go:Render({{if contains "232953457963" .Profile}}AWS prod<inherit,transparent> </>{{end}}) - 19.975µs
[TRACE] 07:46:39.146 text.go:Render({{if contains "930417160920" .Profile}}AWS stage<inherit,transparent> </>{{end}}) - 17.53µs
[TRACE] 07:46:39.147 text.go:Render({{if contains "141575347758" .Profile}}AWS dev<inherit,transparent> </>{{end}}) - 20.813µs
[TRACE] 07:46:39.147 text.go:Render( {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ) - 18.648µs
[TRACE] 07:46:39.147 terminal.go:TemplateCache() - 1.397µs
[TRACE] 07:46:39.147 text.go:Render({{if contains "232953457963" .Profile}}#00ff00{{end}}) - 10.895µs
[TRACE] 07:46:39.147 text.go:Render({{if contains "930417160920" .Profile}}#00ffff{{end}}) - 14.876µs
[TRACE] 07:46:39.147 text.go:Render({{if contains "141575347758" .Profile}}#ffff00{{end}}) - 10.406µs
[TRACE] 07:46:39.147 text.go:Render(plain) - 978ns
[TRACE] 07:46:39.147 text.go:Render({{if contains "232953457963" .Profile}}#00ff00{{end}}) - 13.759µs
[TRACE] 07:46:39.147 text.go:Render({{if contains "930417160920" .Profile}}#00ffff{{end}}) - 10.546µs
[TRACE] 07:46:39.147 text.go:Render({{if contains "141575347758" .Profile}}#ffff00{{end}}) - 11.454µs
[DEBUG] 07:46:39.147 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.147 terminal.go:Getenv(ENVIRONMENT_PROMPT) - 8.032µs
[TRACE] 07:46:39.147 text.go:Render({{if .Env.ENVIRONMENT_PROMPT}}{{.Env.ENVIRONMENT_PROMPT}}<inherit,transparent> </>{{end}}) - 57.828µs
[TRACE] 07:46:39.147 terminal.go:TemplateCache() - 978ns
[TRACE] 07:46:39.147 text.go:Render(plain) - 1.467µs
[DEBUG] 07:46:39.147 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.147 terminal.go:Getenv(DOCKER_PROMPT) - 5.727µs
[TRACE] 07:46:39.147 text.go:Render({{if .Env.DOCKER_PROMPT}}{{.Env.DOCKER_PROMPT}}<inherit,transparent> </>{{end}}) - 29.613µs
[TRACE] 07:46:39.147 terminal.go:TemplateCache() - 978ns
[TRACE] 07:46:39.147 text.go:Render(plain) - 1.467µs
[TRACE] 07:46:39.147 text.go:Render($ ) - 1.396µs
[TRACE] 07:46:39.147 terminal.go:TemplateCache() - 1.397µs
[TRACE] 07:46:39.147 text.go:Render(plain) - 978ns
[TRACE] 07:46:39.147 terminal.go:Shell() - 1.397µs
[TRACE] 07:46:39.147 terminal.go:Shell() - 908ns
[TRACE] 07:46:39.147 terminal.go:Flags() - 1.397µs
[TRACE] 07:46:39.147 terminal.go:Shell() - 978ns
[DEBUG] 07:46:39.147 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.147 terminal.go:Getenv(LOCALAPPDATA) - 6.215µs
[DEBUG] 07:46:39.147 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.147 terminal.go:Getenv(OMP_CACHE_DIR) - 7.194µs
[DEBUG] 07:46:39.147 terminal.go:Getenv:161 → NO DATA
[TRACE] 07:46:39.147 terminal.go:Getenv(XDG_CACHE_HOME) - 5.727µs
[TRACE] 07:46:39.147 terminal.go:CachePath() - 58.946µs
[TRACE] 07:46:39.147 terminal.go:Flags() - 978ns
a300 ~/.poshthemes  default@eu-central-1 $ 
JanDeDobbeleer commented 2 weeks ago

@stheine ok, so it does what it needs to do. In the current behaviour, it does a fallback to the default template. I assume that's not what you expected? If you add "display_default": false, it should also hide the segment in this case. But any other will still display when the templates don't match. Or do you expect, when templates is set to not show the default template on no match?

{
  "style": "plain",
  "foreground": "black",
  "type": "aws",
  "background_templates": [
    "{{if contains \"232953457963\" .Profile}}#00ff00{{end}}",
    "{{if contains \"930417160920\" .Profile}}#00ffff{{end}}",
    "{{if contains \"141575347758\" .Profile}}#ffff00{{end}}"
  ],
  "templates": [
    "{{if contains \"232953457963\" .Profile}}AWS prod<inherit,transparent> </>{{end}}",
    "{{if contains \"930417160920\" .Profile}}AWS stage<inherit,transparent> </>{{end}}",
    "{{if contains \"141575347758\" .Profile}}AWS dev<inherit,transparent> </>{{end}}"
  ],
  "properties": {
    "display_default": false
  }
}
stheine commented 2 weeks ago

ok, that's a change in behavior to the version prior to 24.0.11. but maybe it's wanted to behave like this now.

I'm absolutely fine with that solution! thanks for the quick help!