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

Theme capr4n missing the right section of the promt #5506

Closed tanpro260196 closed 3 weeks ago

tanpro260196 commented 3 weeks ago

Code of Conduct

What happened?

Expect promt: image Actual Promt: image

Theme

capr4n

What OS are you seeing the problem on?

Linux

Which shell are you using?

bash

Log output

Version: 23.7.1

Shell: bash (5.1.16(1)-release)

Prompt:

  root  home  tanpro260196 

Segments:

ConsoleTitle(true)                        -   1 ms
Time(false)                               -   0 ms
Executiontime(false)                      -   0 ms
Session(true)                             -   5 ms
Path(true)                                -   2 ms

Run duration: 19.195332ms

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

Config path: /home/tanpro260196/capr4n.omp.json

Logs:

[DEBUG] 11:02:39.439 debug.go:42 → debug mode enabled
[DEBUG] 11:02:39.439 debug.go:42 → plain mode enabled
[DEBUG] 11:02:39.439 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.439 terminal.go:Getenv(OMP_CACHE_DIR) - 198.963µs
[DEBUG] 11:02:39.439 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.439 terminal.go:Getenv(XDG_CACHE_HOME) - 15.391µs
[TRACE] 11:02:39.439 terminal_unix.go:CachePath() - 282.79µs
[DEBUG] 11:02:39.439 terminal.go:70 → loading cache file: /root/.cache/oh-my-posh/omp.cache
[DEBUG] 11:02:39.439 terminal.go:70 → loading cache key: is_wsl
[DEBUG] 11:02:39.439 terminal.go:70 → loading cache key: upgrade_check
[DEBUG] 11:02:39.439 terminal.go:70 → loading cache key: environment_platform
[TRACE] 11:02:39.439 terminal.go(/root/.cache/oh-my-posh/omp.cache) - 500.156µs
[DEBUG] 11:02:39.439 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.439 terminal.go:Getenv(OMP_CACHE_DIR) - 26.2µs
[DEBUG] 11:02:39.440 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.440 terminal.go:Getenv(XDG_CACHE_HOME) - 15.863µs
[TRACE] 11:02:39.440 terminal_unix.go:CachePath() - 122.497µs
[DEBUG] 11:02:39.440 terminal.go:70 → loading cache file: /root/.cache/oh-my-posh/omp.cache.1286674
[DEBUG] 11:02:39.440 terminal.go:70 → loading cache key: prompt_count_cache
[TRACE] 11:02:39.440 terminal.go(/root/.cache/oh-my-posh/omp.cache.1286674) - 129.939µs
[DEBUG] 11:02:39.440 terminal.go:Getenv:171 → /home/tanpro260196/capr4n.omp.json
[TRACE] 11:02:39.440 terminal.go:Getenv(POSH_THEME) - 7.564µs
[DEBUG] 11:02:39.440 terminal.go:resolveConfigPath:99 → config set using POSH_THEME: /home/tanpro260196/capr4n.omp.json
[TRACE] 11:02:39.440 terminal.go:resolveConfigPath() - 23.244µs
[TRACE] 11:02:39.440 terminal.go:SetPromptCount() - 1.358µs
[TRACE] 11:02:39.440 terminal.go:Init() - 8.171845ms
[TRACE] 11:02:39.440 terminal.go:Flags() - 174ns
[TRACE] 11:02:39.442 load.go:loadConfig() - 2.080613ms
[TRACE] 11:02:39.442 terminal.go:Flags() - 95ns
[DEBUG] 11:02:39.442 debug.go:50 → terminal program: Unknown
[DEBUG] 11:02:39.442 debug.go:50 → terminal shell: shell
[DEBUG] 11:02:39.442 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.442 terminal.go:Getenv(OMP_CACHE_DISABLED) - 13.028µs
[TRACE] 11:02:39.442 terminal.go:Shell() - 240ns
[DEBUG] 11:02:39.442 terminal.go:Getenv:171 → 5.1.16(1)-release
[TRACE] 11:02:39.442 terminal.go:Getenv(POSH_SHELL_VERSION) - 8.104µs
[DEBUG] 11:02:39.442 debug.go:PrintDebug:23 → segment: Title
[DEBUG] 11:02:39.442 text.go:Render:80 → rendering template: {{if .Root}} ⚡ {{end}}{{.UserName}} ➔ 📁{{.Folder}}
[TRACE] 11:02:39.442 terminal.go:Flags() - 350ns
[TRACE] 11:02:39.443 terminal_unix.go:Root() - 9.613µs
[TRACE] 11:02:39.443 terminal.go:Shell() - 275ns
[TRACE] 11:02:39.443 terminal.go:StatusCodes() - 159ns
[DEBUG] 11:02:39.443 terminal_unix.go:IsWsl:35 → false
[TRACE] 11:02:39.443 terminal_unix.go:IsWsl() - 23.972µs
[DEBUG] 11:02:39.443 terminal.go:TemplateCache:660 → environment: [SHELL=/bin/bash SUDO_GID=1000 POSH_PID=1286674 LANGUAGE=en_CA:en SUDO_COMMAND=/bin/bash SUDO_USER=tanpro260196 PWD=/home/tanpro260196 LOGNAME=root HOME=/root LANG=en_CA.UTF-8 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=30;41: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:*.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: POSH_SHELL_VERSION=5.1.16(1)-release OSTYPE=linux-gnu CONDA_PROMPT_MODIFIER=false LESSCLOSE=/usr/bin/lesspipe %s %s TERM=xterm-256color LESSOPEN=| /usr/bin/lesspipe %s USER=root SHLVL=1 POSH_THEME=/home/tanpro260196/capr4n.omp.json PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SUDO_UID=1000 MAIL=/var/mail/root POWERLINE_COMMAND=oh-my-posh OLDPWD=/root/.cache/oh-my-posh/themes _=/usr/local/bin/oh-my-posh]
[TRACE] 11:02:39.444 terminal.go:GOOS() - 213ns
[DEBUG] 11:02:39.444 terminal.go:Pwd:201 → /home/tanpro260196
[TRACE] 11:02:39.444 terminal.go:Pwd() - 58.408µs
[DEBUG] 11:02:39.444 terminal_unix.go:IsWsl:35 → false
[TRACE] 11:02:39.444 terminal_unix.go:IsWsl() - 22.402µs
[TRACE] 11:02:39.444 terminal.go:GOOS() - 140ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 76ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 80ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 79ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 125ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 80ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 81ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 76ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 77ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 78ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 80ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 79ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 80ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 79ns
[DEBUG] 11:02:39.444 terminal.go:User:339 → root
[TRACE] 11:02:39.444 terminal.go:User() - 7.806µs
[DEBUG] 11:02:39.444 terminal.go:Host:356 → Main
[TRACE] 11:02:39.444 terminal.go:Host() - 15.758µs
[TRACE] 11:02:39.444 terminal.go:GOOS() - 123ns
[DEBUG] 11:02:39.444 terminal_unix.go:Platform:92 → ubuntu
[DEBUG] 11:02:39.444 terminal.go:Getenv:171 → 1
[TRACE] 11:02:39.444 terminal.go:Getenv(SHLVL) - 7.546µs
[TRACE] 11:02:39.444 terminal.go:TemplateCache() - 499.585µs
[TRACE] 11:02:39.444 terminal.go:Shell() - 259ns
[DEBUG] 11:02:39.444 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.444 terminal.go:Getenv(POSH_CURSOR_LINE) - 6.936µs
[DEBUG] 11:02:39.444 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.444 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 5.495µs
[TRACE] 11:02:39.444 terminal.go:Flags() - 164ns
[TRACE] 11:02:39.444 terminal.go:Flags() - 75ns
[TRACE] 11:02:39.444 terminal.go:Flags() - 159ns
[TRACE] 11:02:39.444 terminal.go:Pwd() - 293ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 97ns
[DEBUG] 11:02:39.444 segment.go:SetEnabled:115 → segment: Git
[DEBUG] 11:02:39.444 terminal_unix.go:IsWsl:35 → false
[TRACE] 11:02:39.444 terminal_unix.go:IsWsl() - 8.228µs
[TRACE] 11:02:39.444 terminal_unix.go:IsWsl2() - 59.968µs
[TRACE] 11:02:39.444 terminal.go:Flags() - 456ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 79ns
[TRACE] 11:02:39.444 terminal.go:Flags() - 516ns
[TRACE] 11:02:39.444 terminal.go:Pwd() - 514ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 331ns
[TRACE] 11:02:39.444 terminal.go:Pwd() - 404ns
[TRACE] 11:02:39.444 terminal.go:GOOS() - 191ns
[DEBUG] 11:02:39.444 segment.go:SetEnabled:115 → segment: Session
[DEBUG] 11:02:39.444 terminal.go:CommandPath:398 → /usr/bin/git
[TRACE] 11:02:39.444 terminal.go:CommandPath(git) - 117.652µs
[DEBUG] 11:02:39.444 segment.go:SetEnabled:115 → segment: Path
[TRACE] 11:02:39.444 terminal.go:HasCommand(git) - 126.547µs
[TRACE] 11:02:39.444 terminal.go:Getenv(SSH_CONNECTION) - 8.578µs
[DEBUG] 11:02:39.444 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.444 terminal.go:Getenv(SSH_CLIENT) - 6.179µs
[DEBUG] 11:02:39.444 terminal_unix.go:Platform:92 → ubuntu
[DEBUG] 11:02:39.444 git.go:shouldDisplay:285 → fetch_bare_info: false
[TRACE] 11:02:39.444 terminal.go:Pwd() - 207ns
[DEBUG] 11:02:39.444 terminal.go:ResolveSymlink:298 → /home/tanpro260196
[TRACE] 11:02:39.444 terminal.go:ResolveSymlink(/home/tanpro260196) - 34.766µs
[DEBUG] 11:02:39.444 path.go:128 → display_cygpath: false
[TRACE] 11:02:39.444 terminal.go:GOOS() - 251ns
[TRACE] 11:02:39.444 terminal.go:PathSeparator() - 176ns
[TRACE] 11:02:39.444 terminal.go:Pwd() - 333ns
[TRACE] 11:02:39.445 terminal.go:Shell() - 271ns
[TRACE] 11:02:39.445 terminal.go:Shell() - 116ns
[ERROR] 11:02:39.445 terminal.go:HasParentFilePath:562 → stat .git: no such file or directory
[TRACE] 11:02:39.445 terminal.go:HasParentFilePath(.git) - 153.115µs
[DEBUG] 11:02:39.445 path.go:replaceMappedLocations:514 → mapped_locations_enabled: true
[DEBUG] 11:02:39.445 path.go:replaceMappedLocations:515 → 
[DEBUG] 11:02:39.445 path.go:replaceMappedLocations:516 → 
[TRACE] 11:02:39.445 terminal.go:GOOS() - 122ns
[DEBUG] 11:02:39.445 path.go:replaceMappedLocations:517 → ~
[DEBUG] 11:02:39.445 path.go:replaceMappedLocations:522 → mapped_locations: map[]
[TRACE] 11:02:39.445 terminal.go:GOOS() - 160ns
[TRACE] 11:02:39.445 terminal.go:GOOS() - 76ns
[DEBUG] 11:02:39.445 path.go:makeFolderFormatMap:838 → NO DATA
[DEBUG] 11:02:39.445 path.go:setStyle:195 → agnoster_short
[DEBUG] 11:02:39.445 path.go:getAgnosterShortPath:462 → max_depth: 2
[DEBUG] 11:02:39.445 path.go:getAgnosterShortPath:467 → 
[DEBUG] 11:02:39.445 path.go:getAgnosterShortPath:468 → hide_root_location: false
[DEBUG] 11:02:39.445 path.go:colorizePath:712 → cycle: []
[DEBUG] 11:02:39.445 path.go:getFolderSeparator:250 → NO DATA
[DEBUG] 11:02:39.445 path.go:getFolderSeparator:252 →  
[DEBUG] 11:02:39.445 path.go:colorizePath:715 → cycle_folder_separator: false
[DEBUG] 11:02:39.445 path.go:colorizePath:716 → %s
[DEBUG] 11:02:39.445 path.go:colorizePath:718 → %s
[DEBUG] 11:02:39.445 path.go:colorizePath:719 → %s
[DEBUG] 11:02:39.445 path.go:colorizePath:720 → %s
[TRACE] 11:02:39.445 terminal.go:Pwd() - 277ns
[TRACE] 11:02:39.445 terminal.go:TemplateCache() - 412ns
[TRACE] 11:02:39.445 terminal.go:GOOS() - 122ns
[TRACE] 11:02:39.445 terminal.go:StackCount() - 197ns
[TRACE] 11:02:39.445 terminal_unix.go:DirIsWritable(/home/tanpro260196) - 26.034µs
[TRACE] 11:02:39.447 terminal.go:TemplateCache() - 227ns
[DEBUG] 11:02:39.449 terminal.go:RunCommand:376 → NO DATA
[TRACE] 11:02:39.449 terminal.go:RunCommand(who am i) - 5.048179ms
[TRACE] 11:02:39.450 terminal.go:TemplateCache() - 680ns
[DEBUG] 11:02:39.450 text.go:Render:80 → rendering template: {{if .Root}}  {{.UserName}} {{else}} {{.UserName}} {{end}}
[TRACE] 11:02:39.450 terminal.go:Flags() - 354ns
[DEBUG] 11:02:39.450 text.go:Render:80 → rendering template:  {{ .Path }}
[TRACE] 11:02:39.450 terminal.go:Flags() - 375ns
[TRACE] 11:02:39.450 terminal.go:TemplateCache() - 692ns
[TRACE] 11:02:39.450 terminal.go:TemplateCache() - 723ns
[DEBUG] 11:02:39.450 text.go:Render:80 → rendering template: powerline
[TRACE] 11:02:39.450 terminal.go:Flags() - 255ns
[DEBUG] 11:02:39.450 text.go:Render:80 → rendering template: diamond
[TRACE] 11:02:39.450 terminal.go:Flags() - 141ns
[DEBUG] 11:02:39.451 text.go:Render:80 → rendering template: powerline
[TRACE] 11:02:39.451 terminal.go:Flags() - 413ns
[TRACE] 11:02:39.451 terminal.go:Shell() - 450ns
[TRACE] 11:02:39.451 terminal.go:Shell() - 280ns
[TRACE] 11:02:39.451 terminal.go:Flags() - 146ns
[TRACE] 11:02:39.451 terminal.go:Shell() - 139ns
[DEBUG] 11:02:39.451 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.451 terminal.go:Getenv(OMP_CACHE_DIR) - 13.877µs
[DEBUG] 11:02:39.451 terminal.go:Getenv:171 → NO DATA
[TRACE] 11:02:39.451 terminal.go:Getenv(XDG_CACHE_HOME) - 13.246µs
[TRACE] 11:02:39.451 terminal_unix.go:CachePath() - 119.586µs
[TRACE] 11:02:39.451 terminal.go:Flags() - 231ns
JanDeDobbeleer commented 3 weeks ago

@tanpro260196 rprompt isn't supported on bash.