JanDeDobbeleer / oh-my-posh

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

Unknown battery state #5441

Closed youturn45 closed 1 month ago

youturn45 commented 2 months ago

Code of Conduct

What happened?

my mac has an battery state that is unknown which causes icons and colors based on the battery state to not display correctly.

when i output the code directly in ohmyposh it gives me an "Unknown" state, im using the following code:

template = "{{ .State.String}}" type = "battery"

The status in terminal:

Screenshot 2024-08-10 at 5 32 55 PM

My current mac battery state in system info:

Screenshot 2024-08-10 at 5 34 09 PM

please let me know if any additional info is needed.

Theme

Tokyo night

What OS are you seeing the problem on?

macOS

Which shell are you using?

zsh

Log output

Version: 18.27.0

Shell: zsh (5.9)

Prompt:

┏ youturn  zsh  0s                                                                                             Full  RAM:15/16GB  17:34
┖~/.config/ohmyposh                                                                                                          master ≢  ?5
└─Δ

Segments:

ConsoleTitle(false)                        -   0 ms
Session(true)                              -   6 ms
Root(false)                                -   0 ms
Shell(true)                                -   2 ms
Executiontime(true)                        -   2 ms
Aws(false)                                 -   1 ms
Kubectl(false)                             - 148 ms
Root(false)                                -   0 ms
Status(false)                              -   3 ms
Battery(true)                              -   9 ms
Sysinfo(true)                              -   1 ms
Time(true)                                 -   0 ms
Path(true)                                 -   0 ms
Git(true)                                  -  19 ms
Text(true)                                 -   0 ms

Run duration: 190.599792ms

Cache path: /Users/youturn/.cache/oh-my-posh

Config path: /Users/youturn/.config/ohmyposh/tokyo.toml

Logs:

[DEBUG] 17:34:56.046 shell.go:Getenv:398 → iTerm.app
[TRACE] 17:34:56.046 shell.go:Getenv(TERM_PROGRAM) - 1.358125ms
[DEBUG] 17:34:56.046 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.046 shell.go:Getenv(OMP_CACHE_DIR) - 1.959µs
[DEBUG] 17:34:56.046 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.046 shell.go:Getenv(XDG_CACHE_HOME) - 1.333µs
[TRACE] 17:34:56.046 shell_unix.go:CachePath() - 16.75µs
[DEBUG] 17:34:56.047 shell.go:Getenv:398 → /Users/youturn/.config/ohmyposh/tokyo.toml
[TRACE] 17:34:56.047 shell.go:Getenv(POSH_THEME) - 2.667µs
[DEBUG] 17:34:56.047 shell_unix.go:Platform:77 → darwin
[TRACE] 17:34:56.047 shell.go:resolveConfigPath() - 144.25µs
[TRACE] 17:34:56.048 shell.go:Init() - 2.906125ms
[TRACE] 17:34:56.048 shell.go:Flags() - 42ns
[TRACE] 17:34:56.050 config.go:loadConfig() - 1.910625ms
[TRACE] 17:34:56.050 shell.go:Flags() - 83ns
[DEBUG] 17:34:56.050 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.050 shell.go:Getenv(OMP_CACHE_DISABLED) - 2.208µs
[DEBUG] 17:34:56.050 shell.go:Shell:652 → no shell name provided in flags, trying to detect it
[DEBUG] 17:34:56.050 shell.go:Shell:660 → process name: zsh
[TRACE] 17:34:56.050 shell.go:Shell() - 190.75µs
[DEBUG] 17:34:56.050 shell.go:Getenv:398 → 5.9
[TRACE] 17:34:56.050 shell.go:Getenv(POSH_SHELL_VERSION) - 1.584µs
[DEBUG] 17:34:56.050 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 17:34:56.051 text.go:Render:70 → Rendering template:
[DEBUG] 17:34:56.051 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.051 shell.go:Getenv(POSH_CURSOR_LINE) - 111.041µs
[DEBUG] 17:34:56.051 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.051 shell.go:Getenv(POSH_CURSOR_COLUMN) - 1.208µs
[TRACE] 17:34:56.051 shell.go:Flags() - 42ns
[TRACE] 17:34:56.051 shell.go:Flags() - 42ns
[TRACE] 17:34:56.051 shell.go:Shell() - 84ns
[TRACE] 17:34:56.051 shell.go:Shell() - 41ns
[TRACE] 17:34:56.052 shell.go:Flags() - 42ns
[TRACE] 17:34:56.052 shell.go:Flags() - 84ns
[TRACE] 17:34:56.052 shell.go:Flags() - 125ns
[TRACE] 17:34:56.052 shell.go:Flags() - 125ns
[TRACE] 17:34:56.052 shell.go:Flags() - 42ns
[TRACE] 17:34:56.052 shell.go:Flags() - 42ns
[TRACE] 17:34:56.052 shell.go:Flags() - 42ns
[TRACE] 17:34:56.052 shell.go:Flags() - 83ns
[TRACE] 17:34:56.052 shell.go:GOOS() - 208ns
[DEBUG] 17:34:56.052 shell.go:Pwd:428 → /Users/youturn/.config/ohmyposh
[TRACE] 17:34:56.052 shell.go:Pwd() - 182.541µs
[TRACE] 17:34:56.052 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.052 segment.go:SetEnabled:512 → Segment: Aws
[TRACE] 17:34:56.052 shell.go:Pwd() - 334ns
[TRACE] 17:34:56.052 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.052 segment.go:SetEnabled:512 → Segment: Session
[TRACE] 17:34:56.052 shell.go:Pwd() - 250ns
[TRACE] 17:34:56.052 shell.go:GOOS() - 41ns
[DEBUG] 17:34:56.052 segment.go:SetEnabled:512 → Segment: Shell
[TRACE] 17:34:56.052 shell.go:Pwd() - 333ns
[TRACE] 17:34:56.052 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.052 segment.go:SetEnabled:512 → Segment: Executiontime
[TRACE] 17:34:56.052 shell.go:Pwd() - 167ns
[TRACE] 17:34:56.052 shell.go:GOOS() - 0s
[DEBUG] 17:34:56.052 segment.go:SetEnabled:512 → Segment: Root
[TRACE] 17:34:56.052 shell.go:Pwd() - 208ns
[TRACE] 17:34:56.052 shell.go:GOOS() - 0s
[DEBUG] 17:34:56.052 segment.go:SetEnabled:512 → Segment: Root
[TRACE] 17:34:56.052 shell.go:Pwd() - 83ns
[TRACE] 17:34:56.052 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.052 segment.go:SetEnabled:512 → Segment: Kubectl
[TRACE] 17:34:56.052 shell_unix.go:Root() - 292ns
[TRACE] 17:34:56.052 shell_unix.go:Root() - 459ns
[DEBUG] 17:34:56.052 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.052 shell.go:Getenv(SSH_CONNECTION) - 426µs
[DEBUG] 17:34:56.052 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.052 shell.go:Getenv(SSH_CLIENT) - 1.541µs
[DEBUG] 17:34:56.052 shell_unix.go:Platform:77 → darwin
[DEBUG] 17:34:56.053 properties.go:GetBool:22 → display_default: true
[DEBUG] 17:34:56.053 properties.go:GetBool:22 → always_enabled: false
[DEBUG] 17:34:56.053 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.053 shell.go:Getenv(AWS_VAULT) - 1.458µs
[DEBUG] 17:34:56.053 properties.go:GetBool:22 → parse_kubeconfig: false
[DEBUG] 17:34:56.053 properties.go:GetString:28 → {{ .Code }}
[TRACE] 17:34:56.053 shell.go:Pwd() - 84ns
[TRACE] 17:34:56.053 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.053 segment.go:SetEnabled:512 → Segment: Status
[TRACE] 17:34:56.053 shell.go:StatusCodes() - 0s
[DEBUG] 17:34:56.053 shell.go:CommandPath:614 → /usr/local/bin/kubectl
[DEBUG] 17:34:56.053 text.go:Render:70 → Rendering template: {{ .Code }}
[TRACE] 17:34:56.053 shell.go:CommandPath(kubectl) - 25.042µs
[TRACE] 17:34:56.053 shell.go:HasCommand(kubectl) - 27.666µs
[DEBUG] 17:34:56.054 shell.go:TemplateCache:833 → environment: [TERM_SESSION_ID=w0t0p0:AD62A484-3A70-49EF-9409-BF23D04FE970 SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.P6qrdrgAqr/Listeners LC_TERMINAL_VERSION=3.5.3 COLORFGBG=7;0 ITERM_PROFILE=Default XPC_FLAGS=0x0 LANG=en_US.UTF-8 PWD=/Users/youturn/.config/ohmyposh SHELL=/bin/zsh __CFBundleIdentifier=com.googlecode.iterm2 SECURITYSESSIONID=186a4 TERM_FEATURES=T3LrMSc7UUw9Ts3BFGsSyHNoSxF TERM_PROGRAM_VERSION=3.5.3 TERM_PROGRAM=iTerm.app PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/iTerm.app/Contents/Resources/utilities LC_TERMINAL=iTerm2 COLORTERM=truecolor COMMAND_MODE=unix2003 TERM=xterm-256color TERMINFO_DIRS=/Applications/iTerm.app/Contents/Resources/terminfo:/usr/share/terminfo HOME=/Users/youturn TMPDIR=/var/folders/sf/y0_ww0rs42g720lyc81qqs100000gn/T/ USER=youturn XPC_SERVICE_NAME=0 LOGNAME=youturn LaunchInstanceID=61732DB0-01B9-453D-AB0D-10663B50E1EE __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 ITERM_SESSION_ID=w0t0p0:AD62A484-3A70-49EF-9409-BF23D04FE970 SHLVL=1 OLDPWD=/Users/youturn/.config/ohmyposh HOMEBREW_PREFIX=/opt/homebrew HOMEBREW_CELLAR=/opt/homebrew/Cellar HOMEBREW_REPOSITORY=/opt/homebrew INFOPATH=/opt/homebrew/share/info: DEEPSEEK_API_KEY=sk-d9746c5fcc45459d92779fbc4dea7fb5 ZSH=/Users/youturn/.oh-my-zsh POSH_THEME=/Users/youturn/.config/ohmyposh/tokyo.toml POSH_SHELL_VERSION=5.9 POSH_PID=16998 POWERLINE_COMMAND=oh-my-posh CONDA_PROMPT_MODIFIER=false POSH_PROMPT_COUNT=81 PAGER=less LESS=-R LSCOLORS=Gxfxcxdxbxegedabagacad LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43 _=/opt/homebrew/bin/oh-my-posh]
[TRACE] 17:34:56.054 shell.go:Pwd() - 84ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 41ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 41ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 0s
[TRACE] 17:34:56.054 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 84ns
[TRACE] 17:34:56.054 shell.go:GOOS() - 41ns
[DEBUG] 17:34:56.054 shell.go:User:563 → youturn
[TRACE] 17:34:56.054 shell.go:User() - 6µs
[DEBUG] 17:34:56.054 shell.go:Host:575 → localhost
[TRACE] 17:34:56.054 shell.go:Host() - 8.291µs
[TRACE] 17:34:56.054 shell.go:GOOS() - 41ns
[DEBUG] 17:34:56.054 shell.go:Getenv:398 → 1
[TRACE] 17:34:56.054 shell.go:Getenv(SHLVL) - 3.042µs
[TRACE] 17:34:56.054 shell.go:TemplateCache() - 1.057667ms
[TRACE] 17:34:56.054 shell.go:TemplateCache() - 1.062375ms
[TRACE] 17:34:56.055 shell.go:TemplateCache() - 1.709µs
[DEBUG] 17:34:56.055 properties.go:GetBool:22 → always_enabled: false
[DEBUG] 17:34:56.058 shell.go:RunCommand:593 → youturn                       Aug 10 17:34
[TRACE] 17:34:56.058 shell.go:RunCommand(who am i) - 5.393125ms
[TRACE] 17:34:56.058 shell.go:TemplateCache() - 209ns
[ERROR] 17:34:56.200 shell.go:RunCommand:591 → exit status 1
[DEBUG] 17:34:56.200 shell.go:RunCommand:593 ↓
    error: current-context must exist in order to minify

[TRACE] 17:34:56.200 shell.go:RunCommand(kubectl config view --output yaml --minify) - 146.856458ms
[DEBUG] 17:34:56.200 properties.go:GetBool:22 → display_error: false
[DEBUG] 17:34:56.200 text.go:Render:70 → Rendering template: <#ffffff>┏</> {{ .UserName }}
[DEBUG] 17:34:56.200 text.go:Render:70 → Rendering template:   {{ .FormattedMs }}s
[DEBUG] 17:34:56.200 text.go:Render:70 → Rendering template:   {{ .Name }}</>
[TRACE] 17:34:56.201 shell.go:TemplateCache() - 292ns
[TRACE] 17:34:56.201 shell.go:TemplateCache() - 417ns
[TRACE] 17:34:56.201 shell.go:TemplateCache() - 125ns
[TRACE] 17:34:56.201 shell.go:Shell() - 83ns
[TRACE] 17:34:56.201 shell.go:Shell() - 167ns
[TRACE] 17:34:56.201 shell.go:Shell() - 125ns
[DEBUG] 17:34:56.201 text.go:Render:70 → Rendering template: plain
[DEBUG] 17:34:56.201 text.go:Render:70 → Rendering template: diamond
[DEBUG] 17:34:56.201 text.go:Render:70 → Rendering template: plain
[DEBUG] 17:34:56.201 text.go:Render:70 → Rendering template: plain
[DEBUG] 17:34:56.201 text.go:Render:70 → Rendering template: plain
[DEBUG] 17:34:56.201 text.go:Render:70 → Rendering template: plain
[DEBUG] 17:34:56.201 text.go:Render:70 → Rendering template: plain
[DEBUG] 17:34:56.201 text.go:Render:70 → Rendering template: plain
[TRACE] 17:34:56.201 shell.go:Shell() - 42ns
[TRACE] 17:34:56.201 shell.go:Shell() - 41ns
[TRACE] 17:34:56.201 shell.go:Shell() - 0s
[TRACE] 17:34:56.201 shell.go:Shell() - 0s
[TRACE] 17:34:56.201 shell.go:Flags() - 83ns
[TRACE] 17:34:56.201 shell.go:Flags() - 42ns
[TRACE] 17:34:56.201 shell.go:Pwd() - 167ns
[TRACE] 17:34:56.201 shell.go:Flags() - 84ns
[TRACE] 17:34:56.201 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.201 properties.go:GetInt:40 → precision: 2
[DEBUG] 17:34:56.201 segment.go:SetEnabled:512 → Segment: Battery
[DEBUG] 17:34:56.201 shell_unix.go:IsWsl:35 → false
[TRACE] 17:34:56.201 shell_unix.go:IsWsl() - 3.708µs
[TRACE] 17:34:56.201 shell.go:Pwd() - 125ns
[TRACE] 17:34:56.201 shell.go:GOOS() - 0s
[DEBUG] 17:34:56.201 segment.go:SetEnabled:512 → Segment: Time
[DEBUG] 17:34:56.201 properties.go:GetString:28 → 15:04
[TRACE] 17:34:56.201 shell.go:TemplateCache() - 208ns
[TRACE] 17:34:56.202 shell.go:Pwd() - 125ns
[TRACE] 17:34:56.202 shell.go:GOOS() - 83ns
[DEBUG] 17:34:56.202 segment.go:SetEnabled:512 → Segment: Sysinfo
[TRACE] 17:34:56.202 shell.go:TemplateCache() - 917ns
[DEBUG] 17:34:56.211 shell.go:RunCommand:593 ↓
    Now drawing from 'AC Power'
     -InternalBattery-0 (id=7929955)    100%; charged; 0:00 remaining present: true
[TRACE] 17:34:56.211 shell.go:RunCommand(pmset -g batt) - 9.536458ms
[TRACE] 17:34:56.211 shell_darwin.go:BatteryState() - 9.610375ms
[DEBUG] 17:34:56.211 properties.go:GetString:28 → NO DATA
[TRACE] 17:34:56.211 shell.go:TemplateCache() - 83ns
[DEBUG] 17:34:56.211 text.go:Render:70 → Rendering template:   {{ .CurrentDate | date .Format }}
[DEBUG] 17:34:56.211 text.go:Render:70 → Rendering template: {{ .State.String}}
[DEBUG] 17:34:56.211 text.go:Render:70 → Rendering template:   RAM:{{(div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB
[TRACE] 17:34:56.211 shell.go:TemplateCache() - 125ns
[TRACE] 17:34:56.211 shell.go:Shell() - 167ns
[TRACE] 17:34:56.211 shell.go:TemplateCache() - 41ns
[TRACE] 17:34:56.211 shell.go:TemplateCache() - 167ns
[TRACE] 17:34:56.212 shell.go:Shell() - 83ns
[TRACE] 17:34:56.212 shell.go:Shell() - 42ns
[DEBUG] 17:34:56.212 text.go:Render:70 → Rendering template: plain
[DEBUG] 17:34:56.212 text.go:Render:70 → Rendering template: diamond
[DEBUG] 17:34:56.212 text.go:Render:70 → Rendering template: plain
[TRACE] 17:34:56.212 shell.go:Shell() - 42ns
[DEBUG] 17:34:56.214 shell_unix.go:TerminalWidth:70 → terminal width: 140
[TRACE] 17:34:56.214 shell_unix.go:TerminalWidth() - 1.83225ms
[TRACE] 17:34:56.214 shell.go:Shell() - 42ns
[TRACE] 17:34:56.214 shell.go:Shell() - 42ns
[TRACE] 17:34:56.214 shell.go:Shell() - 0s
[TRACE] 17:34:56.214 shell.go:Shell() - 41ns
[TRACE] 17:34:56.214 shell.go:Flags() - 83ns
[TRACE] 17:34:56.214 shell.go:Pwd() - 208ns
[TRACE] 17:34:56.214 shell.go:GOOS() - 0s
[DEBUG] 17:34:56.214 segment.go:SetEnabled:512 → Segment: Path
[TRACE] 17:34:56.214 shell.go:Pwd() - 42ns
[TRACE] 17:34:56.214 shell.go:Shell() - 0s
[TRACE] 17:34:56.214 shell.go:Shell() - 42ns
[DEBUG] 17:34:56.214 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 17:34:56.214 properties.go:GetString:28 → 
[DEBUG] 17:34:56.214 properties.go:GetString:28 → 
[TRACE] 17:34:56.214 shell.go:GOOS() - 41ns
[DEBUG] 17:34:56.214 properties.go:GetString:28 → ~
[DEBUG] 17:34:56.214 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 17:34:56.214 shell.go:PathSeparator() - 42ns
[TRACE] 17:34:56.214 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.214 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 41ns
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 42ns
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 0s
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 0s
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 42ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 0s
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 42ns
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 42ns
[DEBUG] 17:34:56.215 properties.go:GetString:28 → full
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 42ns
[DEBUG] 17:34:56.215 properties.go:GetStringArray:52 → cycle: []
[DEBUG] 17:34:56.215 properties.go:GetString:28 → NO DATA
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 41ns
[DEBUG] 17:34:56.215 properties.go:GetString:28 → /
[DEBUG] 17:34:56.215 properties.go:GetBool:22 → cycle_folder_separator: false
[DEBUG] 17:34:56.215 properties.go:GetString:28 → %s
[DEBUG] 17:34:56.215 properties.go:GetString:28 → %s
[TRACE] 17:34:56.215 shell.go:PathSeparator() - 42ns
[TRACE] 17:34:56.215 shell.go:Pwd() - 42ns
[DEBUG] 17:34:56.215 shell_unix.go:IsWsl:35 → false
[TRACE] 17:34:56.215 shell_unix.go:IsWsl() - 1.791µs
[TRACE] 17:34:56.215 shell.go:StackCount() - 83ns
[TRACE] 17:34:56.215 shell_unix.go:DirIsWritable(/Users/youturn/.config/ohmyposh) - 30.5µs
[TRACE] 17:34:56.215 shell.go:TemplateCache() - 83ns
[DEBUG] 17:34:56.215 text.go:Render:70 → Rendering template: <#ffffff>┖</>{{ .Path }}
[TRACE] 17:34:56.215 shell.go:TemplateCache() - 42ns
[TRACE] 17:34:56.215 shell.go:Shell() - 41ns
[DEBUG] 17:34:56.215 shell.go:Getenv:398 → iTerm.app
[TRACE] 17:34:56.215 shell.go:Getenv(TERM_PROGRAM) - 2.375µs
[DEBUG] 17:34:56.215 text.go:Render:70 → Rendering template: plain
[TRACE] 17:34:56.215 shell.go:Shell() - 41ns
[TRACE] 17:34:56.215 shell.go:Shell() - 42ns
[TRACE] 17:34:56.215 shell.go:Shell() - 42ns
[TRACE] 17:34:56.215 shell.go:Shell() - 41ns
[TRACE] 17:34:56.215 shell.go:Flags() - 42ns
[TRACE] 17:34:56.215 shell.go:Pwd() - 83ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 41ns
[DEBUG] 17:34:56.215 segment.go:SetEnabled:512 → Segment: Git
[DEBUG] 17:34:56.215 shell_unix.go:IsWsl:35 → false
[TRACE] 17:34:56.215 shell_unix.go:IsWsl() - 1.583µs
[TRACE] 17:34:56.215 shell_unix.go:IsWsl2() - 3.125µs
[TRACE] 17:34:56.215 shell.go:GOOS() - 0s
[DEBUG] 17:34:56.215 shell.go:CommandPath:614 → /opt/homebrew/bin/git
[TRACE] 17:34:56.215 shell.go:CommandPath(git) - 15.292µs
[TRACE] 17:34:56.215 shell.go:HasCommand(git) - 17.084µs
[TRACE] 17:34:56.215 shell.go:Pwd() - 41ns
[TRACE] 17:34:56.215 shell.go:HasParentFilePath(.git) - 10.167µs
[DEBUG] 17:34:56.215 properties.go:GetStringArray:52 → exclude_folders: []
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 41ns
[DEBUG] 17:34:56.215 properties.go:GetBool:22 → fetch_user: false
[TRACE] 17:34:56.215 shell.go:GOOS() - 0s
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 41ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 0s
[TRACE] 17:34:56.215 shell.go:GOOS() - 41ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 41ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 41ns
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.215 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.215 shell.go:Getenv(POSH_GIT_STATUS) - 1.625µs
[DEBUG] 17:34:56.215 properties.go:GetBool:22 → fetch_status: true
[DEBUG] 17:34:56.215 properties.go:GetStringArray:52 → ignore_status: []
[TRACE] 17:34:56.215 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.215 properties.go:GetKeyValueMap:46 → status_formats: map[]
[DEBUG] 17:34:56.215 properties.go:GetKeyValueMap:46 → untracked_modes: map[]
[DEBUG] 17:34:56.215 properties.go:GetKeyValueMap:46 → ignore_submodules: map[]
[DEBUG] 17:34:56.230 shell.go:RunCommand:593 ↓
    # branch.oid (initial)
    # branch.head master
    ? atomic.toml
    ? base.json
    ? good.toml
    ? tokyo.json
    ? tokyo.toml
[TRACE] 17:34:56.230 shell.go:RunCommand(git -C /Users/youturn/.config/ohmyposh --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2) - 14.563666ms
[DEBUG] 17:34:56.230 properties.go:GetString:28 → 
[DEBUG] 17:34:56.230 properties.go:GetInt:40 → branch_max_length: 0
[DEBUG] 17:34:56.230 shell.go:HasFolder:507 → false
[TRACE] 17:34:56.230 shell.go:HasFolder(/Users/youturn/.config/ohmyposh/.git/rebase-merge) - 11.917µs
[DEBUG] 17:34:56.230 shell.go:HasFolder:507 → false
[TRACE] 17:34:56.230 shell.go:HasFolder(/Users/youturn/.config/ohmyposh/.git/rebase-apply) - 2.25µs
[DEBUG] 17:34:56.230 properties.go:GetString:28 → 
[DEBUG] 17:34:56.230 shell.go:HasFilesInDir:478 → false
[TRACE] 17:34:56.230 shell.go:HasFilesInDir(MERGE_MSG) - 9.833µs
[DEBUG] 17:34:56.230 shell.go:HasFilesInDir:478 → false
[TRACE] 17:34:56.230 shell.go:HasFilesInDir(CHERRY_PICK_HEAD) - 2.958µs
[DEBUG] 17:34:56.230 shell.go:HasFilesInDir:478 → false
[TRACE] 17:34:56.230 shell.go:HasFilesInDir(REVERT_HEAD) - 2.875µs
[DEBUG] 17:34:56.230 shell.go:HasFilesInDir:478 → false
[TRACE] 17:34:56.230 shell.go:HasFilesInDir(sequencer/todo) - 2.875µs
[DEBUG] 17:34:56.230 properties.go:GetString:28 → ≢
[DEBUG] 17:34:56.230 properties.go:GetBool:22 → fetch_upstream_icon: true
[ERROR] 17:34:56.235 shell.go:RunCommand:591 → exit status 2
[DEBUG] 17:34:56.235 shell.go:RunCommand:593 ↓
    error: No such remote 'origin'

[TRACE] 17:34:56.235 shell.go:RunCommand(git -C /Users/youturn/.config/ohmyposh --no-optional-locks -c core.quotepath=false -c color.status=false remote get-url origin) - 4.329959ms
[TRACE] 17:34:56.235 shell.go:TemplateCache() - 2.583µs
[DEBUG] 17:34:56.235 text.go:Render:70 → Rendering template: <#ffffff> {{ .UpstreamIcon }}</>{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <#ffffff></> {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} <#ffffff></> {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} <#ffffff></> {{ .StashCount }}{{ end }}
[TRACE] 17:34:56.235 shell.go:TemplateCache() - 83ns
[ERROR] 17:34:56.235 shell.go:FileContent:533 → open /Users/youturn/.config/ohmyposh/.git/logs/refs/stash: no such file or directory
[TRACE] 17:34:56.235 shell.go:FileContent(/Users/youturn/.config/ohmyposh/.git/logs/refs/stash) - 14.583µs
[TRACE] 17:34:56.235 shell.go:Shell() - 250ns
[DEBUG] 17:34:56.235 text.go:Render:70 → Rendering template: plain
[TRACE] 17:34:56.235 shell.go:Shell() - 41ns
[DEBUG] 17:34:56.235 shell_unix.go:TerminalWidth:60 → terminal width: 140
[TRACE] 17:34:56.235 shell_unix.go:TerminalWidth() - 2.292µs
[TRACE] 17:34:56.235 shell.go:Shell() - 42ns
[TRACE] 17:34:56.235 shell.go:Shell() - 0s
[TRACE] 17:34:56.235 shell.go:Shell() - 0s
[TRACE] 17:34:56.235 shell.go:Shell() - 0s
[TRACE] 17:34:56.235 shell.go:Flags() - 42ns
[TRACE] 17:34:56.235 shell.go:Pwd() - 125ns
[TRACE] 17:34:56.235 shell.go:GOOS() - 42ns
[DEBUG] 17:34:56.235 segment.go:SetEnabled:512 → Segment: Text
[TRACE] 17:34:56.235 shell.go:TemplateCache() - 41ns
[DEBUG] 17:34:56.235 text.go:Render:70 → Rendering template: <#ffffff>└─Δ</>
[TRACE] 17:34:56.235 shell.go:Shell() - 41ns
[DEBUG] 17:34:56.235 shell.go:Getenv:398 → iTerm.app
[TRACE] 17:34:56.235 shell.go:Getenv(TERM_PROGRAM) - 1.875µs
[DEBUG] 17:34:56.235 text.go:Render:70 → Rendering template: plain
[TRACE] 17:34:56.235 shell.go:Shell() - 0s
[TRACE] 17:34:56.235 shell.go:Shell() - 42ns
[TRACE] 17:34:56.235 shell.go:Shell() - 41ns
[TRACE] 17:34:56.235 shell.go:Shell() - 42ns
[TRACE] 17:34:56.235 shell.go:Flags() - 0s
[DEBUG] 17:34:56.235 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.235 shell.go:Getenv(OMP_CACHE_DIR) - 1.375µs
[DEBUG] 17:34:56.235 shell.go:Getenv:398 → NO DATA
[TRACE] 17:34:56.235 shell.go:Getenv(XDG_CACHE_HOME) - 1.084µs
[TRACE] 17:34:56.235 shell_unix.go:CachePath() - 12.291µs
[TRACE] 17:34:56.235 shell.go:Flags() - 42ns
JanDeDobbeleer commented 1 month ago

@youturn45 I can't reproduce this, neither in test. The output of the pmsat command always returns the correct state.