JanDeDobbeleer / oh-my-posh

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

Error: "-bash: ${prompt@P}: bad substitution" when running on CentOS7 #5560

Closed dannykurniawan80 closed 1 month ago

dannykurniawan80 commented 1 month ago

Code of Conduct

What happened?

After update to recent version, everytime logged in got the following error:

-bash: ${prompt@P}: bad substitution

Theme

Any theme got the same error.

What OS are you seeing the problem on?

Linux

Which shell are you using?

bash

Log output

Version: 23.10.1

Shell: bash

Prompt:

 root   ~     

Segments:

ConsoleTitle(true)                        -   2 ms
Session(true)                             -   3 ms
Path(true)                                -   2 ms
Root(true)                                -   0 ms
Status(true)                              -   2 ms
Node(false)                               -   0 ms
Go(false)                                 -   0 ms
Python(false)                             -   0 ms
Shell(false)                              -   0 ms
Time(false)                               -   0 ms

Run duration: 11.122111ms

Cache path: /root/.cache/oh-my-posh

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

Logs:

[DEBUG] 20:22:08.647 debug.go:42 → debug mode enabled
[DEBUG] 20:22:08.647 debug.go:42 → plain mode enabled
[DEBUG] 20:22:08.647 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.647 terminal.go:Getenv(LOCALAPPDATA) - 839.346µs
[DEBUG] 20:22:08.647 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.647 terminal.go:Getenv(OMP_CACHE_DIR) - 3.9µs
[DEBUG] 20:22:08.647 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.647 terminal.go:Getenv(XDG_CACHE_HOME) - 2.3µs
[TRACE] 20:22:08.648 terminal.go:CachePath() - 906.949µs
[DEBUG] 20:22:08.648 terminal.go:70 → loading cache file: /root/.cache/oh-my-posh/omp.cache
[DEBUG] 20:22:08.648 terminal.go:70 → loading cache key: environment_platform
[DEBUG] 20:22:08.648 terminal.go:70 → loading cache key: is_wsl
[DEBUG] 20:22:08.648 terminal.go:70 → loading cache key: upgrade_check
[TRACE] 20:22:08.648 terminal.go(/root/.cache/oh-my-posh/omp.cache) - 100.305µs
[DEBUG] 20:22:08.648 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.648 terminal.go:Getenv(LOCALAPPDATA) - 2.801µs
[DEBUG] 20:22:08.648 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.648 terminal.go:Getenv(OMP_CACHE_DIR) - 1.9µs
[DEBUG] 20:22:08.648 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.648 terminal.go:Getenv(XDG_CACHE_HOME) - 1.9µs
[TRACE] 20:22:08.648 terminal.go:CachePath() - 22.902µs
[DEBUG] 20:22:08.648 terminal.go:70 → loading cache file: /root/.cache/oh-my-posh/omp.cache.1023
[ERROR] 20:22:08.648 terminal.go:70 → open /root/.cache/oh-my-posh/omp.cache.1023: no such file or directory
[TRACE] 20:22:08.648 terminal.go(/root/.cache/oh-my-posh/omp.cache.1023) - 18.301µs
[DEBUG] 20:22:08.648 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.648 terminal.go:Getenv(POSH_THEME) - 2µs
[DEBUG] 20:22:08.648 terminal.go:ResolveConfigPath:103 → no config set, fallback to default config
[TRACE] 20:22:08.648 terminal.go:ResolveConfigPath() - 12.001µs
[TRACE] 20:22:08.648 terminal.go:SetPromptCount() - 200ns
[TRACE] 20:22:08.648 terminal.go:Init() - 2.91216ms
[TRACE] 20:22:08.648 terminal.go:Flags() - 0s
[DEBUG] 20:22:08.648 load.go:loadConfig:55 → no config file specified, using default
[TRACE] 20:22:08.648 load.go:loadConfig() - 23.202µs
[TRACE] 20:22:08.648 terminal.go:Flags() - 100ns
[DEBUG] 20:22:08.648 debug.go:50 → terminal program: Windows Terminal
[DEBUG] 20:22:08.648 debug.go:50 → terminal shell: shell
[DEBUG] 20:22:08.648 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.648 terminal.go:Getenv(OMP_CACHE_DISABLED) - 3.3µs
[TRACE] 20:22:08.648 terminal.go:Shell() - 300ns
[DEBUG] 20:22:08.648 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.648 terminal.go:Getenv(POSH_SHELL_VERSION) - 2.6µs
[DEBUG] 20:22:08.648 debug.go:PrintDebug:23 → segment: Title
[DEBUG] 20:22:08.648 text.go:Render:80 → rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 20:22:08.648 terminal.go:Flags() - 0s
[TRACE] 20:22:08.648 terminal_unix.go:Root() - 1.1µs
[TRACE] 20:22:08.648 terminal.go:Shell() - 100ns
[TRACE] 20:22:08.648 terminal.go:StatusCodes() - 100ns
[DEBUG] 20:22:08.648 terminal_unix.go:IsWsl:35 → true
[TRACE] 20:22:08.648 terminal_unix.go:IsWsl() - 9.1µs
[DEBUG] 20:22:08.648 terminal.go:TemplateCache:652 → environment: [WT_SESSION=f5aa614a-0999-44e0-a46f-2984fe1b2068 HOSTNAME=DANNY-LAPTOP WAYLAND_DISPLAY=wayland-0 SHELL=/bin/bash TERM=xterm-256color HISTSIZE=1000 WSLENV=WT_SESSION:WT_PROFILE_ID: PULSE_SERVER=unix:/mnt/wslg/PulseServer QT_GRAPHICSSYSTEM_CHECKED=1 USER=root NAME=DANNY-LAPTOP LS_COLORS=rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;5;9:*.sar=38;5;9:*.rar=38;5;9:*.alz=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.cab=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.webm=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.axv=38;5;13:*.anx=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.axa=38;5;45:*.oga=38;5;45:*.spx=38;5;45:*.xspf=38;5;45: WSL_DISTRO_NAME=CentOS7 HOSTTYPE=x86_64 WSL2_GUI_APPS_ENABLED=1 MAIL=/var/spool/mail/root PATH=/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/Embarcadero/Studio/23.0/bin:/mnt/c/Users/Public/Documents/Embarcadero/Studio/23.0/Bpl:/mnt/c/Program Files (x86)/Embarcadero/Studio/23.0/bin64:/mnt/c/Users/Public/Documents/Embarcadero/Studio/23.0/Bpl/Win64:/mnt/c/PROGRA~2/Borland/CBUILD~1/Bin:/mnt/c/PROGRA~2/Borland/CBUILD~1/Projects/Bpl:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/java8path:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Embarcadero/Studio/19.0/bin:/mnt/c/Users/Public/Documents/Embarcadero/Studio/19.0/Bpl:/mnt/c/Program Files (x86)/Embarcadero/Studio/19.0/bin64:/mnt/c/Users/Public/Documents/Embarcadero/Studio/19.0/Bpl/Win64:/mnt/c/Program Files/Eclipse Adoptium/jre-19.0.0.36-hotspot/bin:/mnt/c/WINDOWS/System32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/PROGRA~2/Borland/Delphi5/Projects/Bpl:/mnt/c/PROGRA~2/Borland/vbroker/jre/Bin:/mnt/c/PROGRA~2/Borland/vbroker/Bin:/mnt/c/PROGRA~2/Borland/Delphi5/Bin:/mnt/c/Utilities/Global/bin:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Go/bin:/mnt/c/Program Files (x86)/dotnet/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/usbipd-win/:/mnt/c/Users/Danny/AppData/Roaming/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Users/Danny/AppData/Local/Programs/Python/Python312:/mnt/c/Users/Danny/AppData/Local/Programs/Python/Python312/Scripts:/mnt/d/FFMPEG/bin:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/PowerShell/7/:/Docker/host/bin:/mnt/c/Users/Danny/.cargo/bin:/mnt/c/Users/Public/Documents/RAD Studio/6.0/Bpl:/mnt/c/Users/Danny/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Danny/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/Danny/AppData/Local/Programs/EmEditor:/mnt/c/Program Files (x86)/Midnight Commander:/mnt/c/MinGW/bin:/mnt/c/Users/Public/Documents/Embarcadero/Studio/19.0/Bpl:/mnt/c/Users/Public/Documents/Embarcadero/Studio/19.0/Bpl/Win64:/mnt/c/Users/Danny/AppData/Roaming/npm:/mnt/c/Users/Danny/AppData/Roaming/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Users/Danny/AppData/Local/Programs/Fiddler:/mnt/c/Users/Danny/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Danny/AppData/Local/Programs/oh-my-posh/bin:/root/bin:/home/java/jdk-21/bin:/home/java/maven-3.8.6/bin:/root/.cargo/bin PWD=/root JAVA_HOME=/home/java/jdk-21 LANG=en_US.UTF-8 KDEDIRS=/usr WSL_INTEROP=/run/WSL/1022_interop HISTCONTROL=ignoredups SHLVL=1 HOME=/root LOGNAME=root LESSOPEN=||/usr/bin/lesspipe.sh %s DISPLAY=:0 XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins WT_PROFILE_ID={a8202b0e-781a-5dab-98e2-e9d469a63619} _=/root/.local/bin/oh-my-posh]
[TRACE] 20:22:08.648 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.648 terminal.go:PathSeparator() - 3.4µs
[TRACE] 20:22:08.648 terminal.go:GOOS() - 0s
[DEBUG] 20:22:08.648 terminal.go:Pwd:190 → /root
[TRACE] 20:22:08.648 terminal.go:Pwd() - 27.602µs
[DEBUG] 20:22:08.648 terminal_unix.go:IsWsl:35 → true
[TRACE] 20:22:08.648 terminal_unix.go:IsWsl() - 24.501µs
[DEBUG] 20:22:08.651 terminal.go:RunCommand:368 → //wsl.localhost/CentOS7/root
[TRACE] 20:22:08.651 terminal.go:RunCommand(wslpath -m /root) - 2.36863ms
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.651 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[DEBUG] 20:22:08.651 terminal.go:User:331 → root
[TRACE] 20:22:08.651 terminal.go:User() - 4.501µs
[DEBUG] 20:22:08.651 terminal.go:Host:348 → DANNY-LAPTOP
[TRACE] 20:22:08.651 terminal.go:Host() - 4.6µs
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[DEBUG] 20:22:08.651 terminal_unix.go:Platform:92 → centos7
[DEBUG] 20:22:08.651 terminal.go:Getenv:165 → 1
[TRACE] 20:22:08.651 terminal.go:Getenv(SHLVL) - 4.4µs
[TRACE] 20:22:08.651 terminal.go:TemplateCache() - 2.545339ms
[TRACE] 20:22:08.651 terminal.go:Shell() - 100ns
[DEBUG] 20:22:08.651 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.651 terminal.go:Getenv(POSH_CURSOR_LINE) - 3.4µs
[DEBUG] 20:22:08.651 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.651 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 2.2µs
[TRACE] 20:22:08.651 terminal.go:Flags() - 100ns
[TRACE] 20:22:08.651 terminal.go:Flags() - 0s
[TRACE] 20:22:08.651 terminal.go:Flags() - 100ns
[TRACE] 20:22:08.651 terminal.go:Flags() - 200ns
[TRACE] 20:22:08.651 terminal.go:Pwd() - 100ns
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[DEBUG] 20:22:08.651 segment.go:SetEnabled:115 → segment: Path
[TRACE] 20:22:08.651 terminal.go:Flags() - 200ns
[TRACE] 20:22:08.651 terminal.go:Pwd() - 100ns
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[DEBUG] 20:22:08.651 segment.go:SetEnabled:115 → segment: Git
[DEBUG] 20:22:08.651 status.go:Init:53 → {{ .Code }}
[TRACE] 20:22:08.651 terminal.go:Pwd() - 200ns
[DEBUG] 20:22:08.651 terminal_unix.go:IsWsl:35 → true
[TRACE] 20:22:08.651 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.651 terminal_unix.go:IsWsl() - 15.101µs
[DEBUG] 20:22:08.651 segment.go:SetEnabled:115 → segment: Status
[TRACE] 20:22:08.651 terminal.go:StatusCodes() - 100ns
[DEBUG] 20:22:08.651 text.go:Render:80 → rendering template: {{ .Code }}
[TRACE] 20:22:08.651 terminal.go:Flags() - 0s
[TRACE] 20:22:08.651 terminal.go:Flags() - 200ns
[TRACE] 20:22:08.651 terminal.go:Pwd() - 200ns
[TRACE] 20:22:08.651 terminal.go:GOOS() - 100ns
[DEBUG] 20:22:08.651 segment.go:SetEnabled:115 → segment: Session
[DEBUG] 20:22:08.651 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.651 terminal.go:Getenv(SSH_CONNECTION) - 4.1µs
[DEBUG] 20:22:08.651 path.go:149 → display_cygpath: false
[DEBUG] 20:22:08.651 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.651 terminal.go:GOOS() - 200ns
[TRACE] 20:22:08.651 terminal.go:Getenv(SSH_CLIENT) - 3.101µs
[DEBUG] 20:22:08.651 terminal_unix.go:Platform:92 → centos7
[TRACE] 20:22:08.651 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.651 terminal.go:PathSeparator() - 7.3µs
[TRACE] 20:22:08.651 terminal.go:Pwd() - 100ns
[TRACE] 20:22:08.651 terminal.go:Shell() - 300ns
[TRACE] 20:22:08.651 terminal.go:Shell() - 100ns
[DEBUG] 20:22:08.651 terminal.go:FileContent:302 ↓
    5.15.153.1-microsoft-standard-WSL2

[TRACE] 20:22:08.651 terminal.go:Flags() - 100ns
[TRACE] 20:22:08.651 terminal.go:FileContent(/proc/sys/kernel/osrelease) - 92.705µs
[TRACE] 20:22:08.651 terminal_unix.go:IsWsl2() - 124.307µs
[TRACE] 20:22:08.651 terminal.go:Pwd() - 100ns
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.651 terminal.go:Pwd() - 100ns
[DEBUG] 20:22:08.651 segment.go:SetEnabled:115 → segment: Root
[TRACE] 20:22:08.651 terminal_unix.go:Root() - 1µs
[TRACE] 20:22:08.651 terminal.go:TemplateCache() - 200ns
[TRACE] 20:22:08.651 terminal.go:GOOS() - 0s
[DEBUG] 20:22:08.652 path.go:setMappedLocations:563 → mapped_locations_enabled: true
[DEBUG] 20:22:08.652 path.go:setMappedLocations:564 → 
[DEBUG] 20:22:08.652 path.go:setMappedLocations:565 → 
[TRACE] 20:22:08.653 terminal.go:GOOS() - 600ns
[TRACE] 20:22:08.653 terminal.go:PathSeparator() - 389.721µs
[TRACE] 20:22:08.653 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:GOOS() - 0s
[DEBUG] 20:22:08.653 path.go:setMappedLocations:566 → ~
[DEBUG] 20:22:08.653 path.go:setMappedLocations:571 → mapped_locations: map[]
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:PathSeparator() - 4.7µs
[TRACE] 20:22:08.653 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.653 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.653 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:PathSeparator() - 2.8µs
[TRACE] 20:22:08.653 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.653 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:Flags() - 0s
[DEBUG] 20:22:08.653 path.go:colorizePath:740 → cycle: []
[DEBUG] 20:22:08.653 path.go:getFolderSeparator:273 → NO DATA
[DEBUG] 20:22:08.653 path.go:getFolderSeparator:275 → /
[DEBUG] 20:22:08.653 path.go:colorizePath:743 → cycle_folder_separator: false
[DEBUG] 20:22:08.653 path.go:colorizePath:744 → %s
[DEBUG] 20:22:08.653 path.go:colorizePath:746 → %s
[DEBUG] 20:22:08.653 path.go:colorizePath:747 → %s
[DEBUG] 20:22:08.653 path.go:colorizePath:748 → %s
[TRACE] 20:22:08.653 terminal.go:Pwd() - 200ns
[TRACE] 20:22:08.653 terminal.go:TemplateCache() - 300ns
[TRACE] 20:22:08.653 terminal.go:GOOS() - 100ns
[TRACE] 20:22:08.653 terminal.go:StackCount() - 100ns
[TRACE] 20:22:08.653 terminal.go:TemplateCache() - 400ns
[TRACE] 20:22:08.653 terminal_unix.go:DirIsWritable(/root) - 9.401µs
[TRACE] 20:22:08.653 terminal.go:TemplateCache() - 100ns
[DEBUG] 20:22:08.653 status.go:Enabled:42 → always_enabled: true
[TRACE] 20:22:08.653 terminal.go:TemplateCache() - 201ns
[DEBUG] 20:22:08.654 terminal.go:RunCommand:368 → NO DATA
[TRACE] 20:22:08.654 terminal.go:RunCommand(who am i) - 3.162474ms
[DEBUG] 20:22:08.654 terminal.go:RunCommand:368 → //wsl.localhost/CentOS7/root
[TRACE] 20:22:08.654 terminal.go:RunCommand(wslpath -m /root) - 3.153873ms
[TRACE] 20:22:08.654 terminal.go:GOOS() - 0s
[TRACE] 20:22:08.654 terminal.go:TemplateCache() - 500ns
[DEBUG] 20:22:08.654 terminal.go:CommandPath:390 → /usr/bin/git
[TRACE] 20:22:08.654 terminal.go:CommandPath(git) - 41.302µs
[TRACE] 20:22:08.654 terminal.go:HasCommand(git) - 46.502µs
[DEBUG] 20:22:08.654 git.go:shouldDisplay:285 → fetch_bare_info: false
[TRACE] 20:22:08.654 terminal.go:Pwd() - 200ns
[DEBUG] 20:22:08.654 terminal.go:ResolveSymlink:287 → /root
[TRACE] 20:22:08.654 terminal.go:ResolveSymlink(/root) - 21.901µs
[ERROR] 20:22:08.654 terminal.go:HasParentFilePath:554 → stat .git: no such file or directory
[TRACE] 20:22:08.654 terminal.go:HasParentFilePath(.git) - 65.804µs
[DEBUG] 20:22:08.654 text.go:Render:80 → rendering template:   {{ path .Path .Location }}
[DEBUG] 20:22:08.654 text.go:Render:80 → rendering template:  
[TRACE] 20:22:08.654 terminal.go:Flags() - 100ns
[TRACE] 20:22:08.654 terminal.go:Flags() - 200ns
[DEBUG] 20:22:08.654 text.go:Render:80 → rendering template:  {{ if .SSHSession }} {{ end }}{{ .UserName }}
[TRACE] 20:22:08.654 terminal.go:Flags() - 100ns
[DEBUG] 20:22:08.654 text.go:Render:80 → rendering template:  {{ if gt .Code 0 }}{{ else }}{{ end }}
[TRACE] 20:22:08.654 terminal.go:Flags() - 100ns
[TRACE] 20:22:08.655 terminal.go:TemplateCache() - 200ns
[TRACE] 20:22:08.655 terminal.go:TemplateCache() - 300ns
[TRACE] 20:22:08.655 terminal.go:TemplateCache() - 200ns
[DEBUG] 20:22:08.655 text.go:Render:80 → rendering template: powerline
[TRACE] 20:22:08.655 terminal.go:Flags() - 200ns
[DEBUG] 20:22:08.655 text.go:Render:80 → rendering template: diamond
[TRACE] 20:22:08.655 terminal.go:Flags() - 0s
[DEBUG] 20:22:08.655 text.go:Render:80 → rendering template: powerline
[TRACE] 20:22:08.655 terminal.go:Flags() - 200ns
[DEBUG] 20:22:08.655 text.go:Render:80 → rendering template: powerline
[TRACE] 20:22:08.655 terminal.go:Flags() - 100ns
[DEBUG] 20:22:08.655 text.go:Render:80 → rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 20:22:08.655 terminal.go:Flags() - 0s
[TRACE] 20:22:08.655 terminal.go:TemplateCache() - 200ns
[DEBUG] 20:22:08.655 text.go:Render:80 → rendering template: diamond
[TRACE] 20:22:08.655 terminal.go:Flags() - 100ns
[DEBUG] 20:22:08.655 text.go:Render:80 → rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 20:22:08.655 terminal.go:Flags() - 100ns
[TRACE] 20:22:08.656 terminal.go:TemplateCache() - 700ns
[TRACE] 20:22:08.656 terminal.go:Shell() - 200ns
[TRACE] 20:22:08.656 terminal.go:Shell() - 100ns
[TRACE] 20:22:08.656 terminal.go:Flags() - 400ns
[TRACE] 20:22:08.656 terminal.go:Shell() - 100ns
[DEBUG] 20:22:08.656 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.656 terminal.go:Getenv(LOCALAPPDATA) - 9.3µs
[DEBUG] 20:22:08.656 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.656 terminal.go:Getenv(OMP_CACHE_DIR) - 4.8µs
[DEBUG] 20:22:08.656 terminal.go:Getenv:165 → NO DATA
[TRACE] 20:22:08.656 terminal.go:Getenv(XDG_CACHE_HOME) - 4.2µs
[TRACE] 20:22:08.656 terminal.go:CachePath() - 72.104µs
[TRACE] 20:22:08.656 terminal.go:Flags() - 100ns
JanDeDobbeleer commented 1 month ago

@dannykurniawan80 quite certain your bash version is outdated.

dannykurniawan80 commented 1 month ago

is there any way to downgrade oh-my-posh?

dannykurniawan80 commented 1 month ago

nvm... I'm able to downgrade to the last working version for CentOS7, which is v23.7.2.

Unfortunately since CentOS7 is already at End Of Life, and for the time being I'm still stuck with it.

For those of you who wants to downgrade, here's how to download oh-my-posh v23.7.2:

wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v23.7.2/posh-linux-amd64 -O oh-my-posh