JanDeDobbeleer / oh-my-posh

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

Color overrides in git segment's `status_formats` properties mangle rest of the prompt's colors #5764

Closed rajayonin closed 3 weeks ago

rajayonin commented 3 weeks ago

Code of Conduct

What happened?

I want to have my git status in the prompt, but both .Staging.String and .Working.String displays all the information in one color, as you can see here:

image

The documentation mentions that you can modify the status_formats property in order to format the git string, so I thought I could use that, in combination with a color override, to give each type (modified, untracked, etc.) its own color.

To do that, I just add to my git segment:

  [[blocks.segments]]
    type = 'git'
    # ...

    [blocks.segments.properties]
      # ...
      status_formats.Unmerged = '<lightRed>x%d<\> '
      status_formats.Deleted = '<red>-%d<\> '
      status_formats.Added = '<green>+%d<\> '
      status_formats.Modified = '<lightBlue>~%d<\> '
      status_formats.Untracked = '<lightGreen>?%d<\> '

Doing that the colors of the status string appear correctly, but the problem is that it also messes up the colors for the rest of the current segment, and the following segments, as you can see here:

image

Thanks in advance for such a wonderful prompt theme engine.

Theme

#: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'
  newline = true

  [[blocks.segments]]
    type = 'session'
    style = 'plain'
    template = '╭─ '
    background = 'transparent'
    foreground = 'darkGray'

  [[blocks.segments]]
    type = 'session'
    style = 'plain'
    template = '{{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }} '
    background = 'transparent'
    foreground = 'cyan'

  [[blocks.segments]]
    type = 'path'
    style = 'plain'
    background = 'transparent'
    foreground = 'blue'
    template = '<b>{{ .Path }}</b>'

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

[[blocks]]
  type = 'prompt'
  alignment = 'right'
  overflow = 'hidden'

  [[blocks.segments]]
    type = 'git'
    style = 'plain'
    template = '{{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }}{{if or (gt .Behind 0) (gt .Ahead 0)}} {{end}}{{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }} {{if or (gt .Behind 0) (gt .Ahead 0)}} {{end}}{{ if .Staging.Changed }}{{ .Staging.String }}{{ end }} {{ if .Working.Changed }}{{ .Working.String }}{{ end }} {{.UpstreamIcon}}{{.User.Name}}'
    background = 'transparent'
    foreground = 'cyan'

    [blocks.segments.properties]
      branch_max_length = 25
      fetch_status = true
      fetch_user = true
      fetch_upstream_icon = true
      status_formats.Unmerged = '<lightRed>x%d<\> '
      status_formats.Deleted = '<red>-%d<\> '
      status_formats.Added = '<green>+%d<\> '
      status_formats.Modified = '<lightBlue>~%d<\> '
      status_formats.Untracked = '<lightGreen>?%d<\> '

  [[blocks.segments]]
    type = 'executiontime'
    style = 'plain'
    background = 'transparent'
    foreground = 'yellow'
    template = '{{ if gt .Code 0 }}{{ end }} {{ .FormattedMs }}'

    [blocks.segments.properties]
      threshold = 700

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

  [[blocks.segments]]
    type = 'session'
    style = 'plain'
    template = '╰─'
    background = 'transparent'
    foreground = 'darkGray'

  [[blocks.segments]]
    type = 'text'
    style = 'plain'
    background = 'transparent'
    foreground = 'yellow'
    template = '❯'

[transient_prompt]
  foreground_templates = [
    "{{if gt .Code 0}}red{{end}}",
    "{{if eq .Code 0}}magenta{{end}}",
  ]
  background = 'transparent'
  template = '❯ '

What OS are you seeing the problem on?

Linux

Which shell are you using?

zsh

Log output

Version: 23.20.2

Shell: zsh (5.9)

Prompt:

╭─ ldcas@surfacepro5 ~/dotfiles                                                                            main* +1 ?3 ~1  ldcas-uc3m
╰─❯ 

Segments:

ConsoleTitle(true)                        -   2 ms
Session(true)                             -   6 ms
Session(true)                             -   6 ms
Path(true)                                -   1 ms
Git(true)                                 -  23 ms
Session(true)                             -   3 ms
Text(true)                                -   0 ms

Run duration: 51.312704ms

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

Config path: /home/ldcas/.config/ohmyposh/config.toml

Logs:

[DEBUG] 19:50:46.856 debug.go:49 → debug mode enabled
[DEBUG] 19:50:46.856 debug.go:49 → plain mode enabled
[DEBUG] 19:50:46.856 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.856 terminal.go:Getenv(LOCALAPPDATA) - 39.261µs
[DEBUG] 19:50:46.856 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.856 terminal.go:Getenv(OMP_CACHE_DIR) - 9.333µs
[DEBUG] 19:50:46.856 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.856 terminal.go:Getenv(XDG_CACHE_HOME) - 8.803µs
[TRACE] 19:50:46.857 terminal.go:CachePath() - 146.938µs
[DEBUG] 19:50:46.857 terminal.go:70 → loading cache file: /home/ldcas/.cache/oh-my-posh/omp.cache
[DEBUG] 19:50:46.857 terminal.go:70 → loading cache key: upgrade_check
[DEBUG] 19:50:46.857 terminal.go:70 → loading cache key: environment_platform
[DEBUG] 19:50:46.857 terminal.go:70 → loading cache key: is_wsl
[TRACE] 19:50:46.857 terminal.go(/home/ldcas/.cache/oh-my-posh/omp.cache) - 386.163µs
[DEBUG] 19:50:46.857 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.857 terminal.go:Getenv(LOCALAPPDATA) - 9.554µs
[DEBUG] 19:50:46.857 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.857 terminal.go:Getenv(OMP_CACHE_DIR) - 8.879µs
[DEBUG] 19:50:46.857 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.857 terminal.go:Getenv(XDG_CACHE_HOME) - 8.431µs
[TRACE] 19:50:46.857 terminal.go:CachePath() - 98.51µs
[DEBUG] 19:50:46.857 terminal.go:70 → loading cache file: /home/ldcas/.cache/oh-my-posh/omp.cache.9fe003f8-3158-44ee-a22a-f3281d446114
[DEBUG] 19:50:46.857 terminal.go:70 → loading cache key: prompt_count_cache
[DEBUG] 19:50:46.857 terminal.go:70 → loading cache key: template_cache
[TRACE] 19:50:46.858 terminal.go(/home/ldcas/.cache/oh-my-posh/omp.cache.9fe003f8-3158-44ee-a22a-f3281d446114) - 427.381µs
[TRACE] 19:50:46.858 terminal.go:setPromptCount() - 1.875µs
[DEBUG] 19:50:46.858 terminal.go:Getenv:164 → /home/ldcas/.config/ohmyposh/config.toml
[TRACE] 19:50:46.858 terminal.go:Getenv(POSH_THEME) - 11.204µs
[DEBUG] 19:50:46.858 terminal.go:ResolveConfigPath:96 → config set using POSH_THEME: /home/ldcas/.config/ohmyposh/config.toml
[TRACE] 19:50:46.858 terminal.go:ResolveConfigPath() - 35.293µs
[TRACE] 19:50:46.858 terminal.go:Init() - 1.519731ms
[TRACE] 19:50:46.858 terminal.go:Flags() - 203ns
[TRACE] 19:50:46.858 load.go:loadConfig() - 536.507µs
[TRACE] 19:50:46.858 terminal.go:Flags() - 169ns
[DEBUG] 19:50:46.858 debug.go:57 → terminal program: Unknown
[DEBUG] 19:50:46.858 debug.go:57 → terminal shell: shell
[DEBUG] 19:50:46.858 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.858 terminal.go:Getenv(OMP_CACHE_DISABLED) - 51.532µs
[TRACE] 19:50:46.858 colors.go:SetAccentColor() - 3.358µs
[TRACE] 19:50:46.858 terminal.go:Shell() - 495ns
[DEBUG] 19:50:46.858 terminal.go:Getenv:164 → 5.9
[TRACE] 19:50:46.858 terminal.go:Getenv(POSH_SHELL_VERSION) - 11.289µs
[DEBUG] 19:50:46.858 debug.go:PrintDebug:23 → segment: Title
[DEBUG] 19:50:46.858 text.go:Render:80 → rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 19:50:46.858 terminal.go:Flags() - 245ns
[TRACE] 19:50:46.860 terminal_unix.go:Root() - 4.083µs
[TRACE] 19:50:46.860 terminal.go:Shell() - 324ns
[TRACE] 19:50:46.860 terminal.go:StatusCodes() - 239ns
[DEBUG] 19:50:46.860 terminal_unix.go:IsWsl:35 → false
[TRACE] 19:50:46.860 terminal_unix.go:IsWsl() - 14.721µs
[DEBUG] 19:50:46.860 terminal.go:TemplateCache:673 → environment: [INVOCATION_ID=e96847898b1a456eba9f388b54bcb5a5 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2744,unix/unix:/tmp/.ICE-unix/2744 LANG=en_US.UTF-8 AUTOJUMP_SOURCED=1 XDG_CURRENT_DESKTOP=GNOME MOZ_GMP_PATH=/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed WAYLAND_DISPLAY=wayland-0 MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA= GIO_LAUNCHED_DESKTOP_FILE_PID=3755 XDG_SESSION_CLASS=user GUESTFISH_OUTPUT=\e[0m LESSOPEN=||/usr/bin/lesspipe.sh %s QT_IM_MODULE=ibus STEAM_FRAME_FORCE_CLOSE=1 USER=ldcas HOSTNAME=surfacepro5 AUTOJUMP_ERROR_PATH=/home/ldcas/.local/share/autojump/errors.log HISTSIZE=5000 COLORTERM=truecolor OLDPWD=/home/ldcas DESKTOP_SESSION=gnome TERMINATOR_UUID=urn:uuid:b294df19-2e3b-4730-be6a-c7762266c994 XDG_MENU_PREFIX=gnome- DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus TERMINATOR_DBUS_NAME=net.tenshu.Terminator25ef4b219e3b005583550f2b0f9f990c3 SYSTEMD_EXEC_PID=3113 XDG_DATA_DIRS=/home/ldcas/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/ TERMINATOR_DBUS_PATH=/net/tenshu/Terminator2 VTE_VERSION=7402 XDG_SESSION_DESKTOP=gnome JOURNAL_STREAM=9:16226 HOME=/home/ldcas GNOME_SETUP_DISPLAY=:1 MANAGERPID=2579 MAIL=/var/spool/mail/ldcas DEBUGINFOD_URLS=https://debuginfod.fedoraproject.org/  LOGNAME=ldcas GUESTFISH_INIT=\e[1;34m PATH=/home/ldcas/.local/bin:/home/ldcas/.local/share/zinit/polaris/bin:/home/ldcas/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin XDG_RUNTIME_DIR=/run/user/1000 SHELL=/usr/bin/zsh XDG_SESSION_TYPE=wayland XMODIFIERS=@im=ibus MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/session.slice/org.gnome.SettingsDaemon.MediaKeys.service/memory.pressure EDITOR=nvim HISTCONTROL=ignoredups GUESTFISH_RESTORE=\e[0m GUESTFISH_PS1=\[\e[1;32m\]><fs>\[\e[0;31m\]  GDM_LANG=en_US.UTF-8 PWD=/home/ldcas/dotfiles SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 SHLVL=1 DISPLAY=:0 GDMSESSION=gnome USERNAME=ldcas XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.F0M8V2 TERM=xterm-256color 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=01;37;41: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=01;36:*.au=01;36:*.flac=01;36:*.m4a=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.oga=01;36:*.opus=01;36:*.spx=01;36:*.xspf=01;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90: ZPFX=/home/ldcas/.local/share/zinit/polaris ZSH_CACHE_DIR=/home/ldcas/.cache/zinit PMSPEC=0uUpiPsf POSH_THEME=/home/ldcas/.config/ohmyposh/config.toml POSH_SHELL_VERSION=5.9 POSH_SESSION_ID=9fe003f8-3158-44ee-a22a-f3281d446114 POWERLINE_COMMAND=oh-my-posh CONDA_PROMPT_MODIFIER=false ZLE_RPROMPT_INDENT=0 OSTYPE=linux-gnu _=/home/ldcas/.local/bin/oh-my-posh]
[TRACE] 19:50:46.860 terminal.go:GOOS() - 294ns
[TRACE] 19:50:46.860 terminal.go:PathSeparator() - 23.202µs
[TRACE] 19:50:46.860 terminal.go:GOOS() - 244ns
[DEBUG] 19:50:46.860 terminal.go:Pwd:189 → /home/ldcas/dotfiles
[TRACE] 19:50:46.860 terminal.go:Pwd() - 202.923µs
[DEBUG] 19:50:46.860 terminal_unix.go:IsWsl:35 → false
[TRACE] 19:50:46.860 terminal_unix.go:IsWsl() - 12.735µs
[TRACE] 19:50:46.860 terminal.go:GOOS() - 183ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 111ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 120ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 117ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 116ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 118ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 119ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 114ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 119ns
[TRACE] 19:50:46.860 terminal.go:GOOS() - 111ns
[DEBUG] 19:50:46.860 terminal.go:User:330 → ldcas
[TRACE] 19:50:46.860 terminal.go:User() - 10.814µs
[DEBUG] 19:50:46.860 terminal.go:Host:347 → surfacepro5
[TRACE] 19:50:46.860 terminal.go:Host() - 40.628µs
[TRACE] 19:50:46.861 terminal.go:GOOS() - 109ns
[DEBUG] 19:50:46.861 terminal_unix.go:Platform:92 → fedora
[DEBUG] 19:50:46.861 terminal.go:Getenv:164 → 1
[TRACE] 19:50:46.861 terminal.go:Getenv(SHLVL) - 11.116µs
[TRACE] 19:50:46.861 terminal.go:TemplateCache() - 803.986µs
[TRACE] 19:50:46.861 terminal.go:Shell() - 280ns
[DEBUG] 19:50:46.861 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.861 terminal.go:Getenv(POSH_CURSOR_LINE) - 9.75µs
[DEBUG] 19:50:46.861 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.861 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 8.628µs
[TRACE] 19:50:46.861 terminal.go:Flags() - 201ns
[TRACE] 19:50:46.861 terminal.go:Flags() - 113ns
[TRACE] 19:50:46.861 terminal.go:Flags() - 315ns
[TRACE] 19:50:46.861 terminal.go:Flags() - 838ns
[TRACE] 19:50:46.861 terminal.go:Pwd() - 820ns
[TRACE] 19:50:46.861 terminal.go:GOOS() - 342ns
[DEBUG] 19:50:46.861 segment.go:SetEnabled:115 → segment: Path
[TRACE] 19:50:46.861 terminal.go:Pwd() - 792ns
[TRACE] 19:50:46.861 terminal.go:GOOS() - 262ns
[DEBUG] 19:50:46.861 path.go:149 → display_cygpath: false
[DEBUG] 19:50:46.861 segment.go:SetEnabled:115 → segment: Session
[TRACE] 19:50:46.861 terminal.go:GOOS() - 258ns
[TRACE] 19:50:46.861 terminal.go:GOOS() - 181ns
[DEBUG] 19:50:46.861 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.861 terminal.go:PathSeparator() - 15.254µs
[TRACE] 19:50:46.861 terminal.go:Getenv(SSH_CONNECTION) - 21.339µs
[DEBUG] 19:50:46.861 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.861 terminal.go:Pwd() - 411ns
[TRACE] 19:50:46.861 terminal.go:Getenv(SSH_CLIENT) - 16.833µs
[TRACE] 19:50:46.861 terminal.go:Shell() - 563ns
[DEBUG] 19:50:46.861 terminal_unix.go:Platform:92 → fedora
[TRACE] 19:50:46.861 terminal.go:Shell() - 265ns
[TRACE] 19:50:46.861 terminal.go:GOOS() - 297ns
[DEBUG] 19:50:46.861 path.go:setMappedLocations:563 → mapped_locations_enabled: true
[DEBUG] 19:50:46.861 path.go:setMappedLocations:564 → 
[DEBUG] 19:50:46.861 path.go:setMappedLocations:565 → 
[TRACE] 19:50:46.861 terminal.go:Flags() - 587ns
[TRACE] 19:50:46.861 terminal.go:GOOS() - 326ns
[TRACE] 19:50:46.861 terminal.go:PathSeparator() - 124.276µs
[TRACE] 19:50:46.862 terminal.go:GOOS() - 365ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 377ns
[TRACE] 19:50:46.862 terminal.go:Pwd() - 911ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 138ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 583ns
[DEBUG] 19:50:46.862 path.go:setMappedLocations:566 → ~
[DEBUG] 19:50:46.862 path.go:setMappedLocations:571 → mapped_locations: map[]
[DEBUG] 19:50:46.862 segment.go:SetEnabled:115 → segment: Session
[DEBUG] 19:50:46.862 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.862 terminal.go:Getenv(SSH_CONNECTION) - 21.828µs
[TRACE] 19:50:46.862 terminal.go:GOOS() - 320ns
[DEBUG] 19:50:46.862 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.862 terminal.go:PathSeparator() - 53.95µs
[TRACE] 19:50:46.862 terminal.go:Getenv(SSH_CLIENT) - 16.763µs
[TRACE] 19:50:46.862 terminal.go:GOOS() - 154ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 235ns
[DEBUG] 19:50:46.862 terminal_unix.go:Platform:92 → fedora
[TRACE] 19:50:46.862 terminal.go:GOOS() - 158ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 378ns
[TRACE] 19:50:46.862 terminal.go:PathSeparator() - 19.295µs
[TRACE] 19:50:46.862 terminal.go:GOOS() - 292ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 299ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 454ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 346ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 314ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 403ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 170ns
[TRACE] 19:50:46.862 terminal.go:GOOS() - 402ns
[DEBUG] 19:50:46.862 path.go:makeFolderFormatMap:839 → NO DATA
[TRACE] 19:50:46.862 terminal.go:GOOS() - 319ns
[DEBUG] 19:50:46.862 path.go:setStyle:218 → full
[DEBUG] 19:50:46.862 path.go:colorizePath:740 → cycle: []
[DEBUG] 19:50:46.862 path.go:getFolderSeparator:273 → NO DATA
[DEBUG] 19:50:46.862 path.go:getFolderSeparator:275 → /
[DEBUG] 19:50:46.862 path.go:colorizePath:743 → cycle_folder_separator: false
[DEBUG] 19:50:46.862 path.go:colorizePath:744 → %s
[DEBUG] 19:50:46.862 path.go:colorizePath:746 → %s
[DEBUG] 19:50:46.862 path.go:colorizePath:747 → %s
[DEBUG] 19:50:46.863 path.go:colorizePath:748 → %s
[TRACE] 19:50:46.863 terminal.go:GOOS() - 492ns
[TRACE] 19:50:46.863 terminal.go:Pwd() - 524ns
[TRACE] 19:50:46.863 terminal.go:TemplateCache() - 963ns
[TRACE] 19:50:46.863 terminal.go:GOOS() - 286ns
[TRACE] 19:50:46.863 terminal.go:StackCount() - 446ns
[TRACE] 19:50:46.863 terminal_unix.go:DirIsWritable(/home/ldcas/dotfiles) - 24.685µs
[TRACE] 19:50:46.863 terminal.go:TemplateCache() - 674ns
[DEBUG] 19:50:46.866 terminal.go:RunCommand:370 → NO DATA
[TRACE] 19:50:46.866 terminal.go:RunCommand(who am i) - 4.908021ms
[DEBUG] 19:50:46.868 terminal.go:RunCommand:370 → NO DATA
[TRACE] 19:50:46.868 terminal.go:RunCommand(who am i) - 5.773815ms
[TRACE] 19:50:46.868 terminal.go:TemplateCache() - 1.621µs
[TRACE] 19:50:46.868 terminal.go:TemplateCache() - 1.249µs
[DEBUG] 19:50:46.868 text.go:Render:80 → rendering template: <b>{{ .Path }}</b>
[TRACE] 19:50:46.868 terminal.go:Flags() - 509ns
[DEBUG] 19:50:46.868 text.go:Render:80 → rendering template: ╭─ 
[TRACE] 19:50:46.868 terminal.go:Flags() - 611ns
[DEBUG] 19:50:46.869 text.go:Render:80 → rendering template: {{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }} 
[TRACE] 19:50:46.869 terminal.go:Flags() - 360ns
[TRACE] 19:50:46.871 terminal.go:TemplateCache() - 829ns
[TRACE] 19:50:46.872 terminal.go:TemplateCache() - 792ns
[DEBUG] 19:50:46.873 text.go:Render:80 → rendering template: plain
[TRACE] 19:50:46.874 terminal.go:Flags() - 579ns
[DEBUG] 19:50:46.874 text.go:Render:80 → rendering template: plain
[TRACE] 19:50:46.874 terminal.go:Flags() - 183ns
[DEBUG] 19:50:46.874 text.go:Render:80 → rendering template: plain
[TRACE] 19:50:46.874 terminal.go:Flags() - 112ns
[TRACE] 19:50:46.874 terminal.go:Shell() - 408ns
[TRACE] 19:50:46.874 terminal.go:Shell() - 125ns
[TRACE] 19:50:46.874 terminal.go:Flags() - 116ns
[TRACE] 19:50:46.874 terminal.go:Flags() - 683ns
[TRACE] 19:50:46.874 terminal.go:Pwd() - 469ns
[TRACE] 19:50:46.874 terminal.go:Pwd() - 544ns
[TRACE] 19:50:46.874 terminal.go:GOOS() - 256ns
[TRACE] 19:50:46.874 terminal.go:GOOS() - 265ns
[DEBUG] 19:50:46.874 segment.go:SetEnabled:115 → segment: Git
[DEBUG] 19:50:46.874 segment.go:SetEnabled:115 → segment: Executiontime
[DEBUG] 19:50:46.874 terminal_unix.go:IsWsl:35 → false
[DEBUG] 19:50:46.874 executiontime.go:Enabled:57 → always_enabled: false
[TRACE] 19:50:46.874 terminal_unix.go:IsWsl() - 15.08µs
[TRACE] 19:50:46.874 terminal.go:ExecutionTime() - 273ns
[TRACE] 19:50:46.874 terminal_unix.go:IsWsl2() - 27.686µs
[TRACE] 19:50:46.874 terminal.go:GOOS() - 130ns
[DEBUG] 19:50:46.874 executiontime.go:Enabled:59 → threshold: 700.000000
[DEBUG] 19:50:46.874 terminal.go:CommandPath:394 → /usr/bin/git
[TRACE] 19:50:46.874 terminal.go:CommandPath(git) - 177.919µs
[TRACE] 19:50:46.874 terminal.go:HasCommand(git) - 191.191µs
[DEBUG] 19:50:46.874 git.go:shouldDisplay:312 → fetch_bare_info: false
[TRACE] 19:50:46.874 terminal.go:Pwd() - 320ns
[DEBUG] 19:50:46.874 terminal.go:ResolveSymlink:286 → /home/ldcas/dotfiles
[TRACE] 19:50:46.874 terminal.go:ResolveSymlink(/home/ldcas/dotfiles) - 44.794µs
[TRACE] 19:50:46.875 terminal.go:HasParentFilePath(.git) - 113.893µs
[DEBUG] 19:50:46.875 scm.go:shouldIgnoreRootRepository:150 → exclude_folders: []
[TRACE] 19:50:46.875 terminal.go:GOOS() - 126ns
[TRACE] 19:50:46.875 terminal.go:GOOS() - 110ns
[DEBUG] 19:50:46.875 git.go:Enabled:176 → fetch_user: true
[DEBUG] 19:50:46.880 terminal.go:RunCommand:370 → ldcas-uc3m
[TRACE] 19:50:46.880 terminal.go:RunCommand(git -C /home/ldcas/dotfiles --no-optional-locks -c core.quotepath=false -c color.status=false config user.name) - 5.671591ms
[DEBUG] 19:50:46.886 terminal.go:RunCommand:370 → 71148501+rajayonin@users.noreply.github.com
[TRACE] 19:50:46.886 terminal.go:RunCommand(git -C /home/ldcas/dotfiles --no-optional-locks -c core.quotepath=false -c color.status=false config user.email) - 5.438361ms
[TRACE] 19:50:46.886 terminal.go:GOOS() - 218ns
[TRACE] 19:50:46.886 terminal.go:GOOS() - 128ns
[TRACE] 19:50:46.886 terminal.go:GOOS() - 105ns
[TRACE] 19:50:46.886 terminal.go:GOOS() - 114ns
[TRACE] 19:50:46.886 terminal.go:GOOS() - 115ns
[TRACE] 19:50:46.886 terminal.go:GOOS() - 115ns
[TRACE] 19:50:46.886 terminal.go:GOOS() - 115ns
[TRACE] 19:50:46.886 terminal.go:GOOS() - 118ns
[TRACE] 19:50:46.886 terminal.go:GOOS() - 115ns
[DEBUG] 19:50:46.886 git.go:Enabled:191 → cli
[DEBUG] 19:50:46.886 git.go:Enabled:196 → fetch_status: true
[DEBUG] 19:50:46.886 git.go:shouldIgnoreStatus:454 → ignore_status: []
[TRACE] 19:50:46.886 terminal.go:GOOS() - 298ns
[DEBUG] 19:50:46.886 git.go:setGitStatus:600 → status_formats: map[Added:<green>+%d<\>  Deleted:<red>-%d<\>  Modified:<lightBlue>~%d<\>  Unmerged:<lightRed>x%d<\>  Untracked:<lightGreen>?%d<\> ]
[DEBUG] 19:50:46.886 git.go:getSwitchMode:899 → untracked_modes: map[]
[DEBUG] 19:50:46.886 git.go:getSwitchMode:899 → ignore_submodules: map[]
[DEBUG] 19:50:46.896 terminal.go:RunCommand:370 ↓
    # branch.oid bc355cbb5b6130d7a951371aae0378264cb7cc65
    # branch.head main
    # branch.upstream origin/main
    # branch.ab +0 -0
    1 A. N... 000000 100644 100644 0000000000000000000000000000000000000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 a
    1 .M N... 100644 100644 100644 affd86a53f5c87e61b44bcdfe228f940e4789327 affd86a53f5c87e61b44bcdfe228f940e4789327 zsh/.zshrc
    ? tmp.toml
    ? zsh/.config/
    ? zsh/README.md
[TRACE] 19:50:46.896 terminal.go:RunCommand(git -C /home/ldcas/dotfiles --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2) - 10.080958ms
[DEBUG] 19:50:46.896 git.go:setGitHEADContext:659 → 
[DEBUG] 19:50:46.896 scm.go:formatBranch:114 → mapped_branches: map[]
[DEBUG] 19:50:46.896 scm.go:formatBranch:130 → full_branch_path: true
[DEBUG] 19:50:46.896 scm.go:formatBranch:136 → branch_max_length: 25
[DEBUG] 19:50:46.896 terminal.go:HasFolder:271 → false
[TRACE] 19:50:46.896 terminal.go:HasFolder(/home/ldcas/dotfiles/.git/rebase-merge) - 36.445µs
[DEBUG] 19:50:46.896 terminal.go:HasFolder:271 → false
[TRACE] 19:50:46.896 terminal.go:HasFolder(/home/ldcas/dotfiles/.git/rebase-apply) - 20.076µs
[DEBUG] 19:50:46.896 git.go:setGitHEADContext:710 → 
[DEBUG] 19:50:46.897 terminal.go:HasFilesInDir:242 → false
[TRACE] 19:50:46.897 terminal.go:HasFilesInDir(MERGE_MSG) - 210.462µs
[DEBUG] 19:50:46.897 terminal.go:HasFilesInDir:242 → false
[TRACE] 19:50:46.897 terminal.go:HasFilesInDir(CHERRY_PICK_HEAD) - 21.308µs
[DEBUG] 19:50:46.897 terminal.go:HasFilesInDir:242 → false
[TRACE] 19:50:46.897 terminal.go:HasFilesInDir(REVERT_HEAD) - 19.427µs
[DEBUG] 19:50:46.897 terminal.go:HasFilesInDir:242 → false
[TRACE] 19:50:46.897 terminal.go:HasFilesInDir(sequencer/todo) - 20.434µs
[DEBUG] 19:50:46.897 git.go:473 → ≡
[DEBUG] 19:50:46.897 git.go:Enabled:207 → fetch_upstream_icon: true
[DEBUG] 19:50:46.897 git.go:getUpstreamIcon:537 → upstream_icons: map[]
[DEBUG] 19:50:46.897 git.go:getUpstreamIcon:558 →  
[TRACE] 19:50:46.897 terminal.go:TemplateCache() - 1.014µs
[DEBUG] 19:50:46.897 text.go:Render:80 → rendering template: {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }}{{if or (gt .Behind 0) (gt .Ahead 0)}} {{end}}{{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }} {{if or (gt .Behind 0) (gt .Ahead 0)}} {{end}}{{ if .Staging.Changed }}{{ .Staging.String }}{{ end }} {{ if .Working.Changed }}{{ .Working.String }}{{ end }} {{.UpstreamIcon}}{{.User.Name}}
[TRACE] 19:50:46.897 terminal.go:Flags() - 311ns
[TRACE] 19:50:46.899 terminal.go:TemplateCache() - 545ns
[DEBUG] 19:50:46.899 text.go:Render:80 → rendering template: plain
[TRACE] 19:50:46.899 terminal.go:Flags() - 421ns
[DEBUG] 19:50:46.899 text.go:Render:80 → rendering template: plain
[TRACE] 19:50:46.899 terminal.go:Flags() - 316ns
[DEBUG] 19:50:46.903 terminal_unix.go:TerminalWidth:85 → terminal width: 135
[TRACE] 19:50:46.903 terminal_unix.go:TerminalWidth() - 3.560892ms
[TRACE] 19:50:46.903 terminal.go:Shell() - 581ns
[TRACE] 19:50:46.903 terminal.go:Shell() - 139ns
[TRACE] 19:50:46.903 terminal.go:Flags() - 287ns
[TRACE] 19:50:46.903 terminal.go:Pwd() - 439ns
[TRACE] 19:50:46.903 terminal.go:GOOS() - 268ns
[DEBUG] 19:50:46.903 segment.go:SetEnabled:115 → segment: Text
[TRACE] 19:50:46.903 terminal.go:TemplateCache() - 761ns
[TRACE] 19:50:46.903 terminal.go:Flags() - 820ns
[TRACE] 19:50:46.903 terminal.go:Pwd() - 599ns
[TRACE] 19:50:46.903 terminal.go:GOOS() - 250ns
[DEBUG] 19:50:46.903 segment.go:SetEnabled:115 → segment: Session
[DEBUG] 19:50:46.903 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.903 terminal.go:Getenv(SSH_CONNECTION) - 12.224µs
[DEBUG] 19:50:46.903 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.903 terminal.go:Getenv(SSH_CLIENT) - 81.425µs
[DEBUG] 19:50:46.903 terminal_unix.go:Platform:92 → fedora
[DEBUG] 19:50:46.907 terminal.go:RunCommand:370 → NO DATA
[TRACE] 19:50:46.907 terminal.go:RunCommand(who am i) - 3.473975ms
[TRACE] 19:50:46.907 terminal.go:TemplateCache() - 794ns
[DEBUG] 19:50:46.907 text.go:Render:80 → rendering template: ❯
[TRACE] 19:50:46.907 terminal.go:Flags() - 292ns
[DEBUG] 19:50:46.907 text.go:Render:80 → rendering template: ╰─
[TRACE] 19:50:46.907 terminal.go:Flags() - 112ns
[DEBUG] 19:50:46.907 text.go:Render:80 → rendering template: plain
[TRACE] 19:50:46.907 terminal.go:Flags() - 125ns
[DEBUG] 19:50:46.907 text.go:Render:80 → rendering template: plain
[TRACE] 19:50:46.907 terminal.go:Flags() - 177ns
[TRACE] 19:50:46.907 terminal.go:Shell() - 421ns
[TRACE] 19:50:46.907 terminal.go:Shell() - 114ns
[TRACE] 19:50:46.907 terminal.go:Flags() - 136ns
[TRACE] 19:50:46.907 terminal.go:Shell() - 339ns
[TRACE] 19:50:46.907 terminal.go:Flags() - 114ns
[DEBUG] 19:50:46.907 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.907 terminal.go:Getenv(LOCALAPPDATA) - 13.952µs
[DEBUG] 19:50:46.907 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.907 terminal.go:Getenv(OMP_CACHE_DIR) - 9.718µs
[DEBUG] 19:50:46.907 terminal.go:Getenv:164 → NO DATA
[TRACE] 19:50:46.907 terminal.go:Getenv(XDG_CACHE_HOME) - 8.778µs
[TRACE] 19:50:46.908 terminal.go:CachePath() - 120.628µs
[TRACE] 19:50:46.908 terminal.go:Flags() - 226ns
JanDeDobbeleer commented 3 weeks ago

@rajayonin could it be you added the incorrect color override closing tag? <\> should be </>.

rajayonin commented 3 weeks ago

Oh my god, you're right. I spent hours on this...

Thank you so much, and sorry for the inconvenience. Again, fantastic project.