JanDeDobbeleer / oh-my-posh

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

amro theme is not detecting the git changes #4658

Closed Udayendu closed 9 months ago

Udayendu commented 9 months ago

Code of Conduct

What happened?

Seems to be a bug in amro.omp.json. Its not detecting the git changes.

Theme

https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/amro.omp.json

What OS are you seeing the problem on?

Linux

Which shell are you using?

bash

Log output

# oh-my-posh debug --plain

Version: 19.8.2

Shell: bash (5.1.16(1)-release)

Prompt:

 usekhar on  ~
#

Segments:

ConsoleTitle(false)                       -   0 ms
Session(true)                             -   0 ms
Path(true)                                -   0 ms
Git(false)                                -   0 ms
Root(false)                               -   0 ms
Text(true)                                -   0 ms

Run duration: 12.251543ms

Cache path: /mnt/users/usekhar/.cache/oh-my-posh

Config path: /mnt/users/usekhar/.cache/oh-my-posh/themes/amro.omp.json

Logs:

[DEBUG] 03:53:28.136 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.136 shell.go:Getenv(TERM_PROGRAM) - 102.516µs
[DEBUG] 03:53:28.136 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.136 shell.go:Getenv(OMP_CACHE_DIR) - 19.845µs
[DEBUG] 03:53:28.136 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.136 shell.go:Getenv(XDG_CACHE_HOME) - 4.678µs
[TRACE] 03:53:28.136 shell_unix.go:CachePath() - 75.505µs
[DEBUG] 03:53:28.137 shell.go:Getenv:399 → /mnt/users/usekhar/.cache/oh-my-posh/themes/amro.omp.json
[TRACE] 03:53:28.137 shell.go:Getenv(POSH_THEME) - 25.057µs
[DEBUG] 03:53:28.137 shell_unix.go:Platform:77 → ubuntu
[TRACE] 03:53:28.137 shell.go:resolveConfigPath() - 59.702µs
[TRACE] 03:53:28.137 shell.go:Init() - 1.819674ms
[TRACE] 03:53:28.137 shell.go:Flags() - 269ns
[TRACE] 03:53:28.140 config.go:loadConfig() - 3.068857ms
[TRACE] 03:53:28.140 shell.go:Flags() - 151ns
[DEBUG] 03:53:28.140 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.140 shell.go:Getenv(OMP_CACHE_DISABLED) - 6.603µs
[DEBUG] 03:53:28.140 shell.go:Shell:662 → no shell name provided in flags, trying to detect it
[DEBUG] 03:53:28.142 shell.go:Shell:670 → process name: bash
[TRACE] 03:53:28.142 shell.go:Shell() - 1.47973ms
[DEBUG] 03:53:28.142 shell.go:Getenv:399 → 5.1.16(1)-release
[TRACE] 03:53:28.142 shell.go:Getenv(POSH_SHELL_VERSION) - 6.091µs
[DEBUG] 03:53:28.142 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 03:53:28.142 text.go:Render:70 → Rendering template:
[DEBUG] 03:53:28.142 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.142 shell.go:Getenv(POSH_CURSOR_LINE) - 8.798µs
[DEBUG] 03:53:28.142 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.142 shell.go:Getenv(POSH_CURSOR_COLUMN) - 14.99µs
[TRACE] 03:53:28.142 shell.go:Flags() - 93ns
[TRACE] 03:53:28.142 shell.go:Flags() - 59ns
[TRACE] 03:53:28.142 shell.go:Shell() - 131ns
[TRACE] 03:53:28.142 shell.go:Shell() - 77ns
[TRACE] 03:53:28.142 shell.go:Flags() - 248ns
[TRACE] 03:53:28.142 shell.go:GOOS() - 285ns
[DEBUG] 03:53:28.142 shell.go:Pwd:429 → /mnt/users/usekhar
[TRACE] 03:53:28.142 shell.go:Pwd() - 115.715µs
[TRACE] 03:53:28.142 shell.go:GOOS() - 82ns
[DEBUG] 03:53:28.142 segment.go:SetEnabled:518 → Segment: Git
[DEBUG] 03:53:28.142 shell_unix.go:IsWsl:35 → false
[TRACE] 03:53:28.142 shell_unix.go:IsWsl() - 18.422µs
[TRACE] 03:53:28.142 shell_unix.go:IsWsl2() - 23.771µs
[TRACE] 03:53:28.142 shell.go:GOOS() - 69ns
[DEBUG] 03:53:28.142 shell.go:CommandPath:615 → /usr/bin/git
[TRACE] 03:53:28.142 shell.go:Flags() - 1.917µs
[TRACE] 03:53:28.142 shell.go:CommandPath(git) - 66.247µs
[TRACE] 03:53:28.142 shell.go:HasCommand(git) - 71.925µs
[TRACE] 03:53:28.142 shell.go:Flags() - 438ns
[TRACE] 03:53:28.142 shell.go:Pwd() - 214ns
[TRACE] 03:53:28.142 shell.go:Pwd() - 424ns
[TRACE] 03:53:28.142 shell.go:GOOS() - 136ns
[DEBUG] 03:53:28.142 segment.go:SetEnabled:518 → Segment: Path
[ERROR] 03:53:28.142 shell.go:HasParentFilePath:758 → stat .git: no such file or directory
[TRACE] 03:53:28.142 shell.go:HasParentFilePath(.git) - 84.605µs
[TRACE] 03:53:28.142 shell.go:Pwd() - 172ns
[TRACE] 03:53:28.143 shell.go:Pwd() - 1.363µs
[DEBUG] 03:53:28.143 properties.go:GetBool:22 → fetch_bare_info: false
[TRACE] 03:53:28.143 shell.go:Shell() - 59ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 374ns
[DEBUG] 03:53:28.143 segment.go:SetEnabled:518 → Segment: Session
[DEBUG] 03:53:28.143 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 03:53:28.143 properties.go:GetString:28 → 
[DEBUG] 03:53:28.143 shell.go:Getenv:399 → 10.99.31.222 51213 10.29.62.165 22
[DEBUG] 03:53:28.143 properties.go:GetString:28 → 
[TRACE] 03:53:28.143 shell.go:Getenv(SSH_CONNECTION) - 16.503µs
[TRACE] 03:53:28.143 shell.go:GOOS() - 176ns
[DEBUG] 03:53:28.143 properties.go:GetString:28 → ~
[TRACE] 03:53:28.143 shell_unix.go:Root() - 3.646µs
[TRACE] 03:53:28.143 shell.go:Shell() - 449ns
[DEBUG] 03:53:28.143 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 03:53:28.143 shell.go:StatusCodes() - 686ns
[TRACE] 03:53:28.143 shell.go:PathSeparator() - 198ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 67ns
[DEBUG] 03:53:28.143 shell_unix.go:IsWsl:35 → false
[TRACE] 03:53:28.143 shell.go:GOOS() - 83ns
[TRACE] 03:53:28.143 shell_unix.go:IsWsl() - 13.826µs
[TRACE] 03:53:28.143 shell.go:GOOS() - 278ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 83ns
[TRACE] 03:53:28.143 shell.go:PathSeparator() - 76ns
[TRACE] 03:53:28.143 shell.go:PathSeparator() - 74ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 59ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 61ns
[TRACE] 03:53:28.143 shell.go:PathSeparator() - 93ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 53ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 54ns
[TRACE] 03:53:28.143 shell.go:PathSeparator() - 67ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 58ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 48ns
[TRACE] 03:53:28.143 shell.go:PathSeparator() - 76ns
[DEBUG] 03:53:28.143 shell.go:TemplateCache:843 → environment: [SHELL=/bin/bash POSH_PID=5500 SDKMAN_CANDIDATES_DIR=/mnt/users/usekhar/.sdkman/candidates PWD=/mnt/users/usekhar LOGNAME=usekhar XDG_SESSION_TYPE=tty MOTD_SHOWN=pam HOME=/mnt/users/usekhar LANG=C.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 CONDA_PROMPT_MODIFIER=false LC_TERMINAL=iTerm2 SSH_CONNECTION=10.99.31.222 51213 10.29.62.165 22 GROOVY_HOME=/mnt/users/usekhar/.sdkman/candidates/groovy/current LESSCLOSE=/usr/bin/lesspipe %s %s XDG_SESSION_CLASS=user TERM=xterm-256color LESSOPEN=| /usr/bin/lesspipe %s USER=usekhar LC_TERMINAL_VERSION=3.4.23 SDKMAN_DIR=/mnt/users/usekhar/.sdkman SHLVL=1 SDKMAN_CANDIDATES_API=https://api.sdkman.io/2 XDG_SESSION_ID=58 POSH_THEME=/mnt/users/usekhar/.cache/oh-my-posh/themes/amro.omp.json LC_CTYPE=C.UTF-8 XDG_RUNTIME_DIR=/run/user/3009 SSH_CLIENT=10.99.31.222 51213 22 XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop PATH=/mnt/users/usekhar/.local/bin:/mnt/users/usekhar/.sdkman/candidates/groovy/current/bin:/mnt/svmdev01expodevusers/usekhar/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/3009/bus SDKMAN_PLATFORM=linuxx64 SSH_TTY=/dev/pts/0 POWERLINE_COMMAND=oh-my-posh _=/usr/local/bin/oh-my-posh]
[TRACE] 03:53:28.143 shell_unix.go:DirIsWritable(/mnt/users/usekhar) - 22.588µs
[TRACE] 03:53:28.143 shell.go:Pwd() - 600ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 228ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 113ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 146ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 147ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 137ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 144ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 183ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 143ns
[TRACE] 03:53:28.143 shell.go:GOOS() - 160ns
[DEBUG] 03:53:28.143 shell.go:User:564 → usekhar
[TRACE] 03:53:28.143 shell.go:User() - 11.152µs
[DEBUG] 03:53:28.143 shell.go:Host:576 → vsubuntu-dev-uskar
[TRACE] 03:53:28.143 shell.go:Host() - 16.91µs
[TRACE] 03:53:28.143 shell.go:GOOS() - 140ns
[DEBUG] 03:53:28.143 shell_unix.go:Platform:77 → ubuntu
[DEBUG] 03:53:28.143 shell.go:Getenv:399 → 1
[TRACE] 03:53:28.143 shell.go:Getenv(SHLVL) - 9.203µs
[TRACE] 03:53:28.143 shell.go:TemplateCache() - 568.708µs
[TRACE] 03:53:28.143 shell.go:TemplateCache() - 293.554µs
[DEBUG] 03:53:28.143 text.go:Render:70 → Rendering template:  {{ .UserName }} on
[DEBUG] 03:53:28.143 text.go:Render:70 → Rendering template:   {{ .Path }}
[TRACE] 03:53:28.145 shell.go:TemplateCache() - 986ns
[TRACE] 03:53:28.145 shell.go:Shell() - 366ns
[TRACE] 03:53:28.147 shell.go:TemplateCache() - 1.91µs
[TRACE] 03:53:28.147 shell.go:Shell() - 360ns
[DEBUG] 03:53:28.147 text.go:Render:70 → Rendering template: plain
[DEBUG] 03:53:28.147 text.go:Render:70 → Rendering template: plain
[DEBUG] 03:53:28.147 text.go:Render:70 → Rendering template: plain
[TRACE] 03:53:28.147 shell.go:Shell() - 480ns
[TRACE] 03:53:28.147 shell.go:Shell() - 154ns
[TRACE] 03:53:28.147 shell.go:Shell() - 174ns
[TRACE] 03:53:28.147 shell.go:Shell() - 124ns
[TRACE] 03:53:28.147 shell.go:Flags() - 277ns
[TRACE] 03:53:28.147 shell.go:Flags() - 558ns
[TRACE] 03:53:28.147 shell.go:Pwd() - 684ns
[TRACE] 03:53:28.147 shell.go:GOOS() - 237ns
[DEBUG] 03:53:28.147 segment.go:SetEnabled:518 → Segment: Text
[TRACE] 03:53:28.147 shell.go:Pwd() - 456ns
[TRACE] 03:53:28.147 shell.go:GOOS() - 140ns
[TRACE] 03:53:28.147 shell.go:TemplateCache() - 730ns
[DEBUG] 03:53:28.147 segment.go:SetEnabled:518 → Segment: Root
[TRACE] 03:53:28.147 shell_unix.go:Root() - 1.533µs
[DEBUG] 03:53:28.148 text.go:Render:70 → Rendering template: #
[TRACE] 03:53:28.148 shell.go:Shell() - 185ns
[DEBUG] 03:53:28.148 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.148 shell.go:Getenv(TERM_PROGRAM) - 7.011µs
[DEBUG] 03:53:28.148 text.go:Render:70 → Rendering template: plain
[DEBUG] 03:53:28.148 text.go:Render:70 → Rendering template: plain
[TRACE] 03:53:28.148 shell.go:Shell() - 240ns
[TRACE] 03:53:28.148 shell.go:Shell() - 72ns
[TRACE] 03:53:28.148 shell.go:Shell() - 64ns
[TRACE] 03:53:28.148 shell.go:Shell() - 100ns
[DEBUG] 03:53:28.148 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.148 shell.go:Getenv(OMP_CACHE_DIR) - 7.477µs
[DEBUG] 03:53:28.148 shell.go:Getenv:399 → NO DATA
[TRACE] 03:53:28.148 shell.go:Getenv(XDG_CACHE_HOME) - 4.586µs
[TRACE] 03:53:28.148 shell_unix.go:CachePath() - 51.749µs
[TRACE] 03:53:28.148 shell.go:Flags() - 141ns
JanDeDobbeleer commented 9 months ago

@Udayendu you're expecting git information in your users home folder? Because there's no .git folder there.

Udayendu commented 9 months ago

@Udayendu you're expecting git information in your users home folder? Because there's no .git folder there.

No. When I am inside any git repo where we already have a .git folder, I am expecting to show the git details the way other themes are showing. But this theme is not showing the same, not sure why.

Udayendu commented 9 months ago

When I am using star theme, its showing two file has been changed:

image

But when I am using this there, its now detecting that change:

image

So it's difficult to understand, how many changes and their status.

JanDeDobbeleer commented 9 months ago

@Udayendu that's because amro doesn't have fetch_status set. You can find that information in the docs.

Udayendu commented 9 months ago

https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/amro.omp.json

Okay, as its available in other themes, I did the copy paste to this one. Then re-initialized the theme but still its not detecting the change even though 'git status' can detect it:

 usekhar on  ~/redis-perf-dc-automation  master
➜ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    codebox

nothing added to commit but untracked files present (use "git add" to track)
 usekhar on  ~/redis-perf-dc-automation  master
➜ oh-my-posh debug --plain

Version: 19.8.2

Shell: bash (5.1.16(1)-release)

Prompt:

 usekhar on  ~/redis-perf-dc-automation  master
➜

Segments:

ConsoleTitle(false)                       -   0 ms
Session(true)                             -   0 ms
Path(true)                                -   0 ms
Git(true)                                 -  54 ms
Text(true)                                -   0 ms

Run duration: 67.540871ms

Cache path: /mnt/users/usekhar/.cache/oh-my-posh

Config path: /mnt/users/usekhar/.cache/oh-my-posh/themes/amro.omp.json

Logs:

[DEBUG] 20:24:12.041 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.041 shell.go:Getenv(TERM_PROGRAM) - 103.877µs
[DEBUG] 20:24:12.041 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.041 shell.go:Getenv(OMP_CACHE_DIR) - 20.794µs
[DEBUG] 20:24:12.041 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.041 shell.go:Getenv(XDG_CACHE_HOME) - 4.701µs
[TRACE] 20:24:12.041 shell_unix.go:CachePath() - 65.289µs
[DEBUG] 20:24:12.043 shell.go:Getenv:399 → /mnt/users/usekhar/.cache/oh-my-posh/themes/amro.omp.json
[TRACE] 20:24:12.043 shell.go:Getenv(POSH_THEME) - 28.637µs
[DEBUG] 20:24:12.043 shell_unix.go:Platform:77 → ubuntu
[TRACE] 20:24:12.043 shell.go:resolveConfigPath() - 68.892µs
[TRACE] 20:24:12.043 shell.go:Init() - 2.190725ms
[TRACE] 20:24:12.043 shell.go:Flags() - 344ns
[TRACE] 20:24:12.046 config.go:loadConfig() - 2.982ms
[TRACE] 20:24:12.046 shell.go:Flags() - 154ns
[DEBUG] 20:24:12.046 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.046 shell.go:Getenv(OMP_CACHE_DISABLED) - 13.504µs
[DEBUG] 20:24:12.046 shell.go:Shell:662 → no shell name provided in flags, trying to detect it
[DEBUG] 20:24:12.047 shell.go:Shell:670 → process name: bash
[TRACE] 20:24:12.047 shell.go:Shell() - 1.468013ms
[DEBUG] 20:24:12.047 shell.go:Getenv:399 → 5.1.16(1)-release
[TRACE] 20:24:12.047 shell.go:Getenv(POSH_SHELL_VERSION) - 6.25µs
[DEBUG] 20:24:12.047 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 20:24:12.047 text.go:Render:70 → Rendering template:
[DEBUG] 20:24:12.047 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.047 shell.go:Getenv(POSH_CURSOR_LINE) - 8.996µs
[DEBUG] 20:24:12.047 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.047 shell.go:Getenv(POSH_CURSOR_COLUMN) - 3.862µs
[TRACE] 20:24:12.047 shell.go:Flags() - 159ns
[TRACE] 20:24:12.047 shell.go:Flags() - 110ns
[TRACE] 20:24:12.047 shell.go:Shell() - 200ns
[TRACE] 20:24:12.047 shell.go:Shell() - 106ns
[TRACE] 20:24:12.047 shell.go:Flags() - 314ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 514ns
[DEBUG] 20:24:12.048 shell.go:Pwd:429 → /mnt/users/usekhar/redis-perf-dc-automation
[TRACE] 20:24:12.048 shell.go:Pwd() - 53.381µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 97ns
[DEBUG] 20:24:12.048 segment.go:SetEnabled:518 → Segment: Git
[DEBUG] 20:24:12.048 shell_unix.go:IsWsl:35 → false
[TRACE] 20:24:12.048 shell_unix.go:IsWsl() - 21.937µs
[TRACE] 20:24:12.048 shell_unix.go:IsWsl2() - 28.051µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 133ns
[TRACE] 20:24:12.048 shell.go:Flags() - 549ns
[TRACE] 20:24:12.048 shell.go:Pwd() - 443ns
[DEBUG] 20:24:12.048 shell.go:CommandPath:615 → /usr/bin/git
[TRACE] 20:24:12.048 shell.go:Flags() - 1.625µs
[TRACE] 20:24:12.048 shell.go:CommandPath(git) - 55.568µs
[DEBUG] 20:24:12.048 segment.go:SetEnabled:518 → Segment: Path
[TRACE] 20:24:12.048 shell.go:HasCommand(git) - 69.037µs
[TRACE] 20:24:12.048 shell.go:Pwd() - 248ns
[TRACE] 20:24:12.048 shell.go:Pwd() - 175ns
[TRACE] 20:24:12.048 shell.go:Shell() - 120ns
[TRACE] 20:24:12.048 shell.go:Shell() - 48ns
[TRACE] 20:24:12.048 shell.go:HasParentFilePath(.git) - 40.596µs
[TRACE] 20:24:12.048 shell.go:Pwd() - 1.2µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 273ns
[DEBUG] 20:24:12.048 properties.go:GetStringArray:52 → exclude_folders: []
[TRACE] 20:24:12.048 shell.go:GOOS() - 148ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 67ns
[DEBUG] 20:24:12.048 segment.go:SetEnabled:518 → Segment: Session
[DEBUG] 20:24:12.048 properties.go:GetBool:22 → fetch_user: false
[DEBUG] 20:24:12.048 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 20:24:12.048 properties.go:GetString:28 → 
[DEBUG] 20:24:12.048 shell.go:Getenv:399 → 10.99.31.218 49905 10.29.62.165 22
[TRACE] 20:24:12.048 shell.go:GOOS() - 80ns
[DEBUG] 20:24:12.048 properties.go:GetString:28 → 
[TRACE] 20:24:12.048 shell.go:GOOS() - 78ns
[TRACE] 20:24:12.048 shell.go:Getenv(SSH_CONNECTION) - 12.28µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 62ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 185ns
[DEBUG] 20:24:12.048 properties.go:GetString:28 → ~
[TRACE] 20:24:12.048 shell_unix.go:Root() - 3.228µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 61ns
[TRACE] 20:24:12.048 shell.go:Shell() - 467ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 85ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 69ns
[TRACE] 20:24:12.048 shell.go:StatusCodes() - 243ns
[DEBUG] 20:24:12.048 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 20:24:12.048 shell.go:GOOS() - 68ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 80ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 73ns
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 310ns
[DEBUG] 20:24:12.048 shell_unix.go:IsWsl:35 → false
[TRACE] 20:24:12.048 shell.go:GOOS() - 75ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 80ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 65ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 80ns
[TRACE] 20:24:12.048 shell_unix.go:IsWsl() - 12.277µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 74ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 66ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 64ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 71ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 67ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 66ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 79ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 71ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 59ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 57ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 63ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 64ns
[DEBUG] 20:24:12.048 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.048 shell.go:Getenv(POSH_GIT_STATUS) - 15.647µs
[DEBUG] 20:24:12.048 properties.go:GetBool:22 → fetch_status: true
[DEBUG] 20:24:12.048 properties.go:GetStringArray:52 → ignore_status: []
[TRACE] 20:24:12.048 shell.go:GOOS() - 78ns
[DEBUG] 20:24:12.048 properties.go:GetKeyValueMap:46 → status_formats: map[]
[DEBUG] 20:24:12.048 properties.go:GetKeyValueMap:46 → untracked_modes: map[]
[DEBUG] 20:24:12.048 properties.go:GetKeyValueMap:46 → ignore_submodules: map[]
[DEBUG] 20:24:12.048 shell.go:TemplateCache:843 → environment: [SHELL=/bin/bash POSH_PID=10056 SDKMAN_CANDIDATES_DIR=/mnt/users/usekhar/.sdkman/candidates PWD=/mnt/users/usekhar/redis-perf-dc-automation LOGNAME=usekhar XDG_SESSION_TYPE=tty MOTD_SHOWN=pam HOME=/mnt/users/usekhar LANG=C.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 CONDA_PROMPT_MODIFIER=false LC_TERMINAL=iTerm2 SSH_CONNECTION=10.99.31.218 49905 10.29.62.165 22 GROOVY_HOME=/mnt/users/usekhar/.sdkman/candidates/groovy/current LESSCLOSE=/usr/bin/lesspipe %s %s XDG_SESSION_CLASS=user TERM=xterm-256color LESSOPEN=| /usr/bin/lesspipe %s USER=usekhar LC_TERMINAL_VERSION=3.4.23 SDKMAN_DIR=/mnt/users/usekhar/.sdkman SHLVL=1 SDKMAN_CANDIDATES_API=https://api.sdkman.io/2 XDG_SESSION_ID=190 POSH_THEME=/mnt/users/usekhar/.cache/oh-my-posh/themes/amro.omp.json LC_CTYPE=C.UTF-8 XDG_RUNTIME_DIR=/run/user/3009 SSH_CLIENT=10.99.31.218 49905 22 XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop PATH=/mnt/users/usekhar/.local/bin:/mnt/users/usekhar/.sdkman/candidates/groovy/current/bin:/mnt/svmdev01expodevusers/usekhar/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/3009/bus SDKMAN_PLATFORM=linuxx64 SSH_TTY=/dev/pts/0 POWERLINE_COMMAND=oh-my-posh OLDPWD=/mnt/users/usekhar _=/usr/local/bin/oh-my-posh]
[TRACE] 20:24:12.048 shell.go:GOOS() - 256ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 65ns
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 123ns
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 79ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 67ns
[TRACE] 20:24:12.048 shell.go:Pwd() - 475ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 195ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 60ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 91ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 99ns
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 96ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 111ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 96ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 130ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 61ns
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 104ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 59ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 52ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 254ns
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 80ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 145ns
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 77ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 125ns
[DEBUG] 20:24:12.048 properties.go:GetString:28 → full
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 77ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 117ns
[DEBUG] 20:24:12.048 properties.go:GetStringArray:52 → cycle: []
[TRACE] 20:24:12.048 shell.go:GOOS() - 117ns
[DEBUG] 20:24:12.048 properties.go:GetString:28 → NO DATA
[TRACE] 20:24:12.048 shell.go:GOOS() - 118ns
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 146ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 128ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 252ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 120ns
[DEBUG] 20:24:12.048 properties.go:GetBool:22 → cycle_folder_separator: false
[TRACE] 20:24:12.048 shell.go:GOOS() - 120ns
[DEBUG] 20:24:12.048 properties.go:GetString:28 → %s
[TRACE] 20:24:12.048 shell.go:GOOS() - 117ns
[DEBUG] 20:24:12.048 properties.go:GetString:28 → %s
[TRACE] 20:24:12.048 shell.go:PathSeparator() - 93ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 113ns
[TRACE] 20:24:12.048 shell.go:Pwd() - 229ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 113ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 113ns
[DEBUG] 20:24:12.048 shell_unix.go:IsWsl:35 → false
[TRACE] 20:24:12.048 shell_unix.go:IsWsl() - 7.477µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 106ns
[TRACE] 20:24:12.048 shell.go:StackCount() - 221ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 120ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 101ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 101ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 99ns
[TRACE] 20:24:12.048 shell_unix.go:DirIsWritable(/mnt/users/usekhar/redis-perf-dc-automation) - 19.534µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 249ns
[TRACE] 20:24:12.048 shell.go:GOOS() - 155ns
[DEBUG] 20:24:12.048 shell.go:User:564 → usekhar
[TRACE] 20:24:12.048 shell.go:User() - 20.2µs
[DEBUG] 20:24:12.048 shell.go:Host:576 → vsubuntu-dev-uskar
[TRACE] 20:24:12.048 shell.go:Host() - 15.16µs
[TRACE] 20:24:12.048 shell.go:GOOS() - 115ns
[DEBUG] 20:24:12.048 shell_unix.go:Platform:77 → ubuntu
[DEBUG] 20:24:12.048 shell.go:Getenv:399 → 1
[TRACE] 20:24:12.048 shell.go:Getenv(SHLVL) - 8.158µs
[TRACE] 20:24:12.049 shell.go:TemplateCache() - 604.356µs
[TRACE] 20:24:12.049 shell.go:TemplateCache() - 161.646µs
[DEBUG] 20:24:12.100 shell.go:RunCommand:594 ↓
    # branch.oid 096c126abfd99e56ee25f625a78697ef3643536a
    # branch.head master
    # branch.upstream origin/master
    # branch.ab +0 -0
    ? codebox
[TRACE] 20:24:12.100 shell.go:RunCommand(git -C /mnt/users/usekhar/redis-perf-dc-automation --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2) - 52.133552ms
[DEBUG] 20:24:12.100 properties.go:GetString:28 → 
[DEBUG] 20:24:12.100 properties.go:GetInt:40 → branch_max_length: 0
[DEBUG] 20:24:12.100 shell.go:HasFolder:508 → false
[TRACE] 20:24:12.100 shell.go:HasFolder(/mnt/users/usekhar/redis-perf-dc-automation/.git/rebase-merge) - 37.261µs
[DEBUG] 20:24:12.100 shell.go:HasFolder:508 → false
[TRACE] 20:24:12.100 shell.go:HasFolder(/mnt/users/usekhar/redis-perf-dc-automation/.git/rebase-apply) - 25.348µs
[DEBUG] 20:24:12.100 properties.go:GetString:28 → 
[DEBUG] 20:24:12.100 shell.go:HasFilesInDir:479 → false
[TRACE] 20:24:12.101 shell.go:HasFilesInDir(MERGE_MSG) - 73.092µs
[DEBUG] 20:24:12.101 shell.go:HasFilesInDir:479 → false
[TRACE] 20:24:12.101 shell.go:HasFilesInDir(CHERRY_PICK_HEAD) - 32.817µs
[DEBUG] 20:24:12.101 shell.go:HasFilesInDir:479 → false
[TRACE] 20:24:12.101 shell.go:HasFilesInDir(REVERT_HEAD) - 37.058µs
[DEBUG] 20:24:12.101 shell.go:HasFilesInDir:479 → false
[TRACE] 20:24:12.101 shell.go:HasFilesInDir(sequencer/todo) - 21.567µs
[DEBUG] 20:24:12.101 properties.go:GetString:28 → ≡
[DEBUG] 20:24:12.101 properties.go:GetBool:22 → fetch_upstream_icon: true
[DEBUG] 20:24:12.102 properties.go:GetKeyValueMap:46 → upstream_icons: map[]
[DEBUG] 20:24:12.102 properties.go:GetString:28 → 
[TRACE] 20:24:12.102 shell.go:TemplateCache() - 1.174µs
[DEBUG] 20:24:12.102 text.go:Render:70 → Rendering template: {{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}
[DEBUG] 20:24:12.102 text.go:Render:70 → Rendering template:  {{ .UserName }} on
[DEBUG] 20:24:12.103 text.go:Render:70 → Rendering template:   {{ .Path }}
[TRACE] 20:24:12.105 shell.go:TemplateCache() - 1.261µs
[TRACE] 20:24:12.105 shell.go:Shell() - 211ns
[TRACE] 20:24:12.106 shell.go:TemplateCache() - 7.897µs
[TRACE] 20:24:12.106 shell.go:Shell() - 489ns
[TRACE] 20:24:12.107 shell.go:TemplateCache() - 982ns
[ERROR] 20:24:12.107 shell.go:FileContent:534 → open /mnt/users/usekhar/redis-perf-dc-automation/.git/logs/refs/stash: no such file or directory
[TRACE] 20:24:12.107 shell.go:FileContent(/mnt/users/usekhar/redis-perf-dc-automation/.git/logs/refs/stash) - 66.499µs
[TRACE] 20:24:12.107 shell.go:Shell() - 256ns
[DEBUG] 20:24:12.107 text.go:Render:70 → Rendering template: plain
[DEBUG] 20:24:12.108 text.go:Render:70 → Rendering template: plain
[DEBUG] 20:24:12.108 text.go:Render:70 → Rendering template: plain
[TRACE] 20:24:12.108 shell.go:Shell() - 330ns
[TRACE] 20:24:12.108 shell.go:Shell() - 78ns
[TRACE] 20:24:12.108 shell.go:Shell() - 92ns
[TRACE] 20:24:12.108 shell.go:Shell() - 80ns
[TRACE] 20:24:12.108 shell.go:Flags() - 328ns
[TRACE] 20:24:12.108 shell.go:Pwd() - 377ns
[TRACE] 20:24:12.108 shell.go:GOOS() - 188ns
[DEBUG] 20:24:12.108 segment.go:SetEnabled:518 → Segment: Text
[TRACE] 20:24:12.108 shell.go:TemplateCache() - 363ns
[DEBUG] 20:24:12.108 text.go:Render:70 → Rendering template: ➜
[TRACE] 20:24:12.108 shell.go:Shell() - 180ns
[DEBUG] 20:24:12.108 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.108 shell.go:Getenv(TERM_PROGRAM) - 7.539µs
[DEBUG] 20:24:12.108 text.go:Render:70 → Rendering template: plain
[TRACE] 20:24:12.108 shell.go:Shell() - 163ns
[TRACE] 20:24:12.108 shell.go:Shell() - 77ns
[TRACE] 20:24:12.108 shell.go:Shell() - 153ns
[TRACE] 20:24:12.108 shell.go:Shell() - 163ns
[DEBUG] 20:24:12.108 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.108 shell.go:Getenv(OMP_CACHE_DIR) - 8.311µs
[DEBUG] 20:24:12.108 shell.go:Getenv:399 → NO DATA
[TRACE] 20:24:12.108 shell.go:Getenv(XDG_CACHE_HOME) - 5.776µs
[TRACE] 20:24:12.108 shell_unix.go:CachePath() - 57.82µs
[TRACE] 20:24:12.108 shell.go:Flags() - 140ns
 usekhar on  ~/redis-perf-dc-automation  master
➜

Here is how I have added the fetch_status:

image

JanDeDobbeleer commented 9 months ago

If you remove the template override, it will show what you're looking for.

Udayendu commented 9 months ago

If you remove the template override, it will show what you're looking for.

What is template override and how can i remove that??

JanDeDobbeleer commented 9 months ago

There's a field called template in that segment definition. You can remove that one as it doesn't contain the status fields (and thus will never print those).

Udayendu commented 9 months ago

There's a field called template in that segment definition. You can remove that one as it doesn't contain the status fields (and thus will never print those).

Thanks @JanDeDobbeleer, after removing the template section its working as expected. Can we have that fixed permanently in the json of that theme ? Because once will update the oh-my-posh package, it will break for sure.

JanDeDobbeleer commented 9 months ago

@Udayendu this isn't a bug in the theme. It's a deliberate configuration. Not everyone cares about git status information as it's the slowest command.

github-actions[bot] commented 5 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.