JanDeDobbeleer / oh-my-posh

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

Get-PoshStackCount occasionally fails to be loaded when reloading profile #4652

Closed DEberhardt closed 9 months ago

DEberhardt commented 9 months ago

Code of Conduct

What happened?

This happens sometimes in VsCode, though I have also seen it in Terminal (PS7) When Reloading my profile, it sometimes stumbles over itself. Re-doing that will usually fix, so don't know whether this may lead to chasing ghosts... apologies.

Profile hasn't changed in ages, though I now have a function to reload the profile instead of always starting a new session.

Exception

PS>$error[0]
global:Get-PoshStackCount:                                                                                                                                 
Line |                                                                                                                                                     
 419 |          $stackCount = global:Get-PoshStackCount                                                                                                    
     |                        ~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                    
     | The term 'global:Get-PoshStackCount' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Error: invalid argument "" for "-s, --stack-count" flag: strconv.ParseInt: parsing "": invalid syntax
Usage:
  oh-my-posh prompt print [debug|primary|secondary|transient|right|tooltip|valid|error] [flags]

Checkpoint-Profile

if it helps, I am reloading my profile with a little function:

function Checkpoint-Profile {
    # Reloads current profile
    [CmdletBinding()]
    [Alias('rpo')]
    param()

    @(
        $Profile.AllUsersAllHosts,
        $Profile.AllUsersCurrentHost,
        $Profile.CurrentUserAllHosts,
        $Profile.CurrentUserCurrentHost
    ) | ForEach-Object {
        if (Test-Path $_) {
            Write-Information "$($PsStyle.Foreground.Magenta)Loading Profile:$($PsStyle.Reset) $($_  | Split-Path -Leaf)" -InformationAction Continue
            . $_
        }
    }
}

Function call in the profile

Import-Module Terminal-Icons
Import-Module posh-git
oh-my-posh init pwsh --config $DevEnvPSScriptPath\ParagnosterPlus2.omp.json | Invoke-Expression

Theme

{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [{ "alignment": "left", "segments": [{ "Enabled": false, "foreground": "#1BD760", "properties": { "paused_icon": "\uf8e3 ", "playing_icon": "\ue602 ", "stopped_icon": "\uf04d ", "track_separator": " - " }, "style": "plain", "template": "{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }} ", "type": "spotify" }], "type": "prompt" }, { "alignment": "right", "segments": [{ "foreground": "#91ddff", "style": "plain", "template": " \uf85a {{ round .PhysicalPercentUsed .Precision }}% ", "type": "sysinfo" }, { "foreground_templates": [ "{{if eq \"Charging\" .State.String}}#40c4ff{{end}}", "{{if eq \"Discharging\" .State.String}}#ff5722{{end}}", "{{if eq \"Full\" .State.String}}#4caf50{{end}}" ], "foreground": "#f36943", "properties": { "charged_icon": "\uf583 ", "charging_icon": "\uf588 ", "discharging_icon": "\uf57d " }, "style": "plain", "template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}% ", "type": "battery" }, { "type": "owm", "style": "plain", "foreground": "#91ddff", "template": "{{.Weather}} {{ .Temperature }}{{.UnitIcon }} ", "properties": { "apikey": "3d07cc3aeda66d90243a06c9f4deac5f", "location": "BRISTOL,GB", "units": "metric", "http_timeout": 100, "cache_timeout": 10 } }, { "foreground": "#ffffff", "properties": { "time_format": "_2 Jan" }, "style": "plain", "template": " {{ .CurrentDate | date .Format }}", "type": "time" }, { "foreground": "#91ddff", "properties": { "datetime_format": "2022-01-02 15:04:05", "time_format": "15:04:05" }, "style": "plain", "template": " {{ .CurrentDate | date .Format }}", "type": "time" } ], "type": "prompt" }, { "alignment": "left", "newline": true, "segments": [{ "Enabled": false, "background": "#ff8800", "foreground": "#100e23", "powerline_symbol": "\ue0c0", "properties": { "root_icon": "" }, "style": "powerline", "template": " \uf0e7 ", "type": "root" }, { "Enabled": false, "background": "#8800dd", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "properties": { "style": "amarillo", "threshold": 500 }, "style": "powerline", "template": " {{ .FormattedMs }} ", "type": "executiontime" }, { "background": "#ffffff", "foreground": "#100e23", "powerline_symbol": "\ue0b0", "style": "powerline", "template": " {{ .Name }} ", "type": "shell" }, { "Enabled": false, "background": "#91ddff", "foreground": "#100e23", "powerline_symbol": "\ue0b0", "properties": { "folder_icon": "\uf115", "folder_separator_icon": " \ue0b1 ", "style": "full" }, "style": "powerline", "template": " {{ .Path }} ", "type": "path" }, { "background": "#95ffa4", "background_templates": [ "{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}", "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}", "{{ if gt .Ahead 0 }}#B388FF{{ end }}", "{{ if gt .Behind 0 }}#B388FF{{ end }}" ], "foreground": "#193549", "leading_diamond": "\ue0b6", "powerline_symbol": "\ue0b0", "properties": { "branch_max_length": 25, "fetch_stash_count": true, "fetch_status": true, "fetch_upstream_icon": true }, "style": "powerline", "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ", "trailing_diamond": "\ue0b4", "type": "git" }, { "Enabled": false, "background": "#906cff", "foreground": "#100e23", "powerline_symbol": "\ue0b0", "style": "powerline", "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ", "type": "python" }, { "Enabled": false, "background": "#ff8080", "foreground": "#ffffff", "powerline_symbol": "\ue0b0", "style": "powerline", "template": " {{ if gt .Code 0 }}\uf00d {{ .Meaning }}{{ else }}\uf42e{{ end }} ", "type": "exit" } ], "type": "prompt" }, { "alignment": "left", "newline": true, "segments": [{ "Enabled": false, "foreground": "#007ACC", "style": "plain", "template": "\u276f ", "type": "text" }], "type": "prompt" } ], "transient_prompt": { "background": "transparent", "foreground": "#666666", "template": "[{{ .Segments.Time.CurrentDate | date \"2006-01-02 15:04:05\" }}]{{ if .Segments.Executiontime.Ms }}{{ if eq \"False\" (title (default \"False\" .Env.DISABLE_SEGMENT_TRANSIENT_EXEC_TIME)) }}[{{ .Segments.Executiontime.FormattedMs }}]{{ end }}{{ end }}\u276f " }, "version": 2 }

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 19.8.2

Shell: pwsh (7.4.1)

Prompt:

 Siouxsie and the Banshees - Cities In Dust                                                                                  76%   100%  30 Jan 10:54:41
 pwsh  C:   
❯ 

Segments:

ConsoleTitle(false)                        -   0 ms
Spotify(true)                              -  10 ms
Sysinfo(true)                              -   0 ms
Battery(true)                              -  20 ms
Owm(false)                                 - 103 ms
Time(true)                                 -   0 ms
Time(true)                                 -   0 ms
Root(false)                                -   0 ms
Executiontime(false)                       -   0 ms
Shell(true)                                -   0 ms
Path(true)                                 -   1 ms
Git(false)                                 -   4 ms
Python(false)                              -   4 ms
Exit(false)                                -   0 ms
Text(true)                                 -   0 ms

Run duration: 141.2434ms

Cache path: C:\Users\david.eberhardt\AppData\Local\oh-my-posh

Config path: C:\Users\david.eberhardt\OneDrive - Applicable Ltd\Documents\PowerShell\Scripts\ParagnosterPlus2.omp.json

Logs:

[DEBUG] 10:54:41.581 shell.go:Getenv:399 → vscode
[TRACE] 10:54:41.581 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 10:54:41.581 shell.go:Getenv:399 → C:\Users\david.eberhardt\AppData\Local
[TRACE] 10:54:41.581 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 10:54:41.581 shell_windows.go:CachePath() - 0s
[DEBUG] 10:54:41.585 shell.go:Getenv:399 → C:\Users\david.eberhardt\OneDrive - Applicable Ltd\Documents\PowerShell\Scripts\ParagnosterPlus2.omp.json
[TRACE] 10:54:41.585 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 10:54:41.585 shell.go:Shell:662 → no shell name provided in flags, trying to detect it
[DEBUG] 10:54:41.599 shell.go:Shell:670 → process name: pwsh.exe
[TRACE] 10:54:41.599 shell.go:Shell() - 13.6188ms
[TRACE] 10:54:41.599 shell.go:resolveConfigPath() - 13.6188ms
[TRACE] 10:54:41.599 shell.go:Init() - 17.7146ms
[TRACE] 10:54:41.600 shell.go:Flags() - 0s
[TRACE] 10:54:41.600 config.go:loadConfig() - 1.4434ms
[TRACE] 10:54:41.600 shell.go:Flags() - 0s
[DEBUG] 10:54:41.600 shell.go:Getenv:399 → NO DATA
[TRACE] 10:54:41.600 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 10:54:41.601 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.601 shell_windows.go:WindowsRegistryKeyValue:215 → ColorizationColor(DWORD): 0xC46B69D6
[TRACE] 10:54:41.601 shell.go:Shell() - 0s
[DEBUG] 10:54:41.601 shell.go:Getenv:399 → 7.4.1
[TRACE] 10:54:41.601 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 10:54:41.601 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 10:54:41.601 text.go:Render:70 → Rendering template:
[DEBUG] 10:54:41.601 shell.go:Getenv:399 → 4
[TRACE] 10:54:41.601 shell.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 10:54:41.601 shell.go:Getenv:399 → 1
[TRACE] 10:54:41.601 shell.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 10:54:41.601 shell.go:Flags() - 0s
[TRACE] 10:54:41.601 shell.go:Flags() - 0s
[TRACE] 10:54:41.601 shell.go:Shell() - 0s
[TRACE] 10:54:41.601 shell.go:Shell() - 0s
[TRACE] 10:54:41.601 shell.go:Flags() - 0s
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.601 shell.go:Pwd:429 → C:\
[TRACE] 10:54:41.601 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.601 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.601 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.601 segment.go:SetEnabled:518 → Segment: Spotify
[TRACE] 10:54:41.612 shell_windows.go:QueryWindowTitles(^(Spotify.*)|(.*\s-\s.*)$) - 10.3129ms
[DEBUG] 10:54:41.612 properties.go:GetString:28 → 
[TRACE] 10:54:41.612 shell_windows.go:Root() - 502.8µs
[TRACE] 10:54:41.612 shell.go:Shell() - 0s
[TRACE] 10:54:41.612 shell.go:StatusCodes() - 0s
[TRACE] 10:54:41.612 shell_windows.go:IsWsl() - 0s
[DEBUG] 10:54:41.612 shell.go:TemplateCache:843 → environment: [ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\david.eberhardt\AppData\Roaming CHROME_CRASHPAD_PIPE_NAME=\\.\pipe\crashpad_27600_HJVZSXEVKFTRHTZL CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=UKDELL4477 ComSpec=C:\WINDOWS\system32\cmd.exe CONDA_PROMPT_MODIFIER=False DriverData=C:\Windows\System32\Drivers\DriverData EFC_11220=1 HOME=C:\Users\david.eberhardt HOMEDRIVE=C: HOMEPATH=\Users\david.eberhardt IGCCSVC_DB=AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAEu1AY5gDLkGdeigPWzVLHQQAAAACAAAAAAAQZgAAAAEAACAAAADnwh8cjNN10Ph/dYSaFFTE+x8yd4AdVqkM4MQGLM6cowAAAAAOgAAAAAIAACAAAABrzA7enz5uACY0LFqSnaMbnJkPXv9yx5qkk6v9z/DwvWAAAAAWB5d53JB6AETwv5lVsh+ZmyZm3qEh8IlcZ5ic1AyrKmyoIAwv7t3LDoBBR8+Lnj0Q9mLYw50MthHJo5KWoaGlFzbyfldbDKnXQjf6rWO4EkB9ZIonpsMPmenAEu8BZ8xAAAAA9xr7f3jxpvAG/73T2u3xrpkw/cW8wsJsSvmTe2UIRShlXjpq2Fv3+oMJR5vB8JsQpvLk2PTqUg2lrs39BvGKnA== LOCALAPPDATA=C:\Users\david.eberhardt\AppData\Local LOGONSERVER=\\APPBRSDC03 NUMBER_OF_PROCESSORS=8 OneDrive=C:\Users\david.eberhardt\OneDrive - Applicable Ltd OneDriveCommercial=C:\Users\david.eberhardt\OneDrive - Applicable Ltd ORIGINAL_XDG_CURRENT_DESKTOP=undefined OS=Windows_NT Path=C:\Program Files\PowerShell\7;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\PowerShell\7-preview\preview;C:\Program Files\Git\cmd;C:\Program Files\PowerShell\7\;C:\Users\david.eberhardt\AppData\Local\Microsoft\WindowsApps;C:\Users\david.eberhardt\AppData\Local\GitHubDesktop\bin;;C:\Users\david.eberhardt\AppData\Local\Programs\oh-my-posh\bin;C:\Users\david.eberhardt\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Azure Data Studio\bin;C:\Users\david.eberhardt\AppData\Local\Microsoft\WinGet\Packages\Microsoft.Sysinternals.RDCMan_Microsoft.Winget.Source_8wekyb3d8bbwe PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL POSH_AZURE_ENABLED=False POSH_CURSOR_COLUMN=1 POSH_CURSOR_LINE=4 POSH_GIT_ENABLED=False POSH_INSTALLER=ws POSH_PID=22876 POSH_SHELL_VERSION=7.4.1 POSH_THEME=C:\Users\david.eberhardt\OneDrive - Applicable Ltd\Documents\PowerShell\Scripts\ParagnosterPlus2.omp.json POSH_THEMES_PATH=C:\Users\david.eberhardt\AppData\Local\Programs\oh-my-posh\themes POWERLINE_COMMAND=oh-my-posh POWERSHELL_DISTRIBUTION_CHANNEL=PSES PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 140 Stepping 1, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=8c01 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PSExecutionPolicyPreference=Bypass PSModulePath=C:\Users\david.eberhardt\OneDrive - Applicable Ltd\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft System Center\Operations Manager\Powershell\;c:\Users\david.eberhardt\.vscode\extensions\ms-vscode.powershell-2024.0.0\modules PUBLIC=C:\Users\Public SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\DAVID~1.EBE\AppData\Local\Temp TMP=C:\Users\DAVID~1.EBE\AppData\Local\Temp USERDNSDOMAIN=APPSMGMT.LOCAL USERDOMAIN=APPSMGMT USERDOMAIN_ROAMINGPROFILE=APPSMGMT USERNAME=David.Eberhardt USERPROFILE=C:\Users\david.eberhardt windir=C:\WINDOWS ZES_ENABLE_SYSMAN=1 TERM_PROGRAM=vscode TERM_PROGRAM_VERSION=1.85.2 LANG=en_US.UTF-8 COLORTERM=truecolor GIT_ASKPASS=c:\Users\david.eberhardt\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass.sh VSCODE_GIT_ASKPASS_NODE=C:\Users\david.eberhardt\AppData\Local\Programs\Microsoft VS Code\Code.exe VSCODE_GIT_ASKPASS_EXTRA_ARGS=--ms-enable-electron-run-as-node VSCODE_GIT_ASKPASS_MAIN=c:\Users\david.eberhardt\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass-main.js VSCODE_GIT_IPC_HANDLE=\\.\pipe\vscode-git-2a02fc2609-sock]
[TRACE] 10:54:41.612 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.612 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.612 shell.go:GOOS() - 0s
[TRACE] 10:54:41.612 shell.go:GOOS() - 0s
[TRACE] 10:54:41.612 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.612 shell.go:User:564 → David.Eberhardt
[TRACE] 10:54:41.612 shell.go:User() - 0s
[DEBUG] 10:54:41.612 shell.go:Host:576 → UKDELL4477
[TRACE] 10:54:41.612 shell.go:Host() - 0s
[TRACE] 10:54:41.612 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.612 shell.go:Getenv:399 → NO DATA
[TRACE] 10:54:41.612 shell.go:Getenv(SHLVL) - 0s
[TRACE] 10:54:41.612 shell.go:TemplateCache() - 502.8µs
[DEBUG] 10:54:41.612 text.go:Render:70 → Rendering template: {{ .Icon }}{{ if ne .Status "stopped" }}{{ .Artist }} - {{ .Track }}{{ end }}
[TRACE] 10:54:41.612 shell.go:TemplateCache() - 0s
[TRACE] 10:54:41.613 shell.go:Shell() - 0s
[DEBUG] 10:54:41.613 text.go:Render:70 → Rendering template: plain
[TRACE] 10:54:41.613 shell.go:Shell() - 0s
[TRACE] 10:54:41.613 shell.go:Shell() - 0s
[TRACE] 10:54:41.613 shell.go:Shell() - 0s
[TRACE] 10:54:41.613 shell.go:Flags() - 0s
[TRACE] 10:54:41.613 shell.go:Flags() - 0s
[TRACE] 10:54:41.613 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.613 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.613 shell.go:GOOS() - 0s
[TRACE] 10:54:41.613 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.613 segment.go:SetEnabled:518 → Segment: Time
[DEBUG] 10:54:41.613 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.613 shell.go:GOOS() - 0s
[TRACE] 10:54:41.613 shell.go:Flags() - 0s
[DEBUG] 10:54:41.613 segment.go:SetEnabled:518 → Segment: Battery
[TRACE] 10:54:41.613 shell_windows.go:IsWsl() - 0s
[TRACE] 10:54:41.613 shell.go:Flags() - 0s
[DEBUG] 10:54:41.613 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.613 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.613 segment.go:SetEnabled:518 → Segment: Owm
[TRACE] 10:54:41.613 shell.go:Flags() - 0s
[TRACE] 10:54:41.613 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.613 properties.go:GetString:28 → metric
[DEBUG] 10:54:41.613 properties.go:GetInt:40 → cache_timeout: 10
[DEBUG] 10:54:41.613 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.613 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.613 segment.go:SetEnabled:518 → Segment: Time
[DEBUG] 10:54:41.613 properties.go:GetInt:40 → precision: 2
[DEBUG] 10:54:41.613 properties.go:Get:58 → api_key: <nil>
[DEBUG] 10:54:41.613 properties.go:GetString:28 → _2 Jan
[DEBUG] 10:54:41.613 properties.go:Get:58 → apiKey: <nil>
[TRACE] 10:54:41.613 shell.go:TemplateCache() - 0s
[DEBUG] 10:54:41.613 properties.go:GetString:28 → BRISTOL,GB
[DEBUG] 10:54:41.613 properties.go:GetFloat64:34 → latitude: 91.000000
[DEBUG] 10:54:41.613 properties.go:GetFloat64:34 → longitude: 181.000000
[DEBUG] 10:54:41.613 properties.go:GetString:28 → metric
[DEBUG] 10:54:41.613 properties.go:GetInt:40 → http_timeout: 100
[TRACE] 10:54:41.613 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.613 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.613 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.613 segment.go:SetEnabled:518 → Segment: Sysinfo
[TRACE] 10:54:41.613 shell.go:TemplateCache() - 0s
[DEBUG] 10:54:41.613 shell.go:HTTPRequest:714 ↓
    GET /geo/1.0/direct?q=BRISTOL,GB&limit=1&appid=. HTTP/1.1
    Host: api.openweathermap.org
    User-Agent: Go-http-client/1.1
    Accept-Encoding: gzip

[TRACE] 10:54:41.633 shell_windows_nix.go:BatteryState() - 20.6622ms
[DEBUG] 10:54:41.633 properties.go:GetString:28 → 
[TRACE] 10:54:41.633 shell.go:TemplateCache() - 0s
[ERROR] 10:54:41.716 shell.go:HTTPRequest:718 → Get "http://api.openweathermap.org/geo/1.0/direct?q=BRISTOL,GB&limit=1&appid=.": context deadline exceeded 
[TRACE] 10:54:41.716 shell.go:HTTPRequest(http://api.openweathermap.org/geo/1.0/direct?q=BRISTOL,GB&limit=1&appid=.) - 103.2588ms
[ERROR] 10:54:41.716 owm.go:Enabled:66 → context deadline exceeded
[DEBUG] 10:54:41.716 text.go:Render:70 → Rendering template:  {{ .CurrentDate | date .Format }}
[DEBUG] 10:54:41.716 text.go:Render:70 → Rendering template:   {{ round .PhysicalPercentUsed .Precision }}%
[DEBUG] 10:54:41.716 text.go:Render:70 → Rendering template:  {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}%
[DEBUG] 10:54:41.716 text.go:Render:70 → Rendering template:  {{ .CurrentDate | date .Format }}
[TRACE] 10:54:41.716 shell.go:TemplateCache() - 0s
[TRACE] 10:54:41.716 shell.go:TemplateCache() - 0s
[TRACE] 10:54:41.716 shell.go:TemplateCache() - 0s
[TRACE] 10:54:41.716 shell.go:Shell() - 0s
[TRACE] 10:54:41.716 shell.go:Shell() - 0s
[TRACE] 10:54:41.716 shell.go:Shell() - 0s
[DEBUG] 10:54:41.716 text.go:Render:70 → Rendering template: plain
[DEBUG] 10:54:41.716 text.go:Render:70 → Rendering template: {{if eq "Charging" .State.String}}#40c4ff{{end}}
[TRACE] 10:54:41.717 shell.go:TemplateCache() - 0s
[DEBUG] 10:54:41.717 text.go:Render:70 → Rendering template: {{if eq "Discharging" .State.String}}#ff5722{{end}}
[TRACE] 10:54:41.717 shell.go:TemplateCache() - 0s
[DEBUG] 10:54:41.717 text.go:Render:70 → Rendering template: {{if eq "Full" .State.String}}#4caf50{{end}}
[TRACE] 10:54:41.717 shell.go:TemplateCache() - 0s
[DEBUG] 10:54:41.717 text.go:Render:70 → Rendering template: plain
[DEBUG] 10:54:41.717 text.go:Render:70 → Rendering template: plain
[DEBUG] 10:54:41.717 text.go:Render:70 → Rendering template: plain
[DEBUG] 10:54:41.717 text.go:Render:70 → Rendering template: plain
[TRACE] 10:54:41.717 shell.go:Shell() - 0s
[DEBUG] 10:54:41.717 shell_windows.go:TerminalWidth:109 → terminal width: 155
[TRACE] 10:54:41.717 shell_windows.go:TerminalWidth() - 517.8µs
[TRACE] 10:54:41.717 shell.go:Shell() - 0s
[TRACE] 10:54:41.717 shell.go:Shell() - 0s
[TRACE] 10:54:41.717 shell.go:Shell() - 0s
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[DEBUG] 10:54:41.717 properties.go:GetString:28 → {{ .Code }}
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.717 segment.go:SetEnabled:518 → Segment: Exit
[DEBUG] 10:54:41.717 segment.go:SetEnabled:518 → Segment: Root
[TRACE] 10:54:41.717 shell.go:StatusCodes() - 0s
[DEBUG] 10:54:41.717 text.go:Render:70 → Rendering template: {{ .Code }}
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[DEBUG] 10:54:41.717 segment.go:SetEnabled:518 → Segment: Path
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell_windows.go:Root() - 0s
[DEBUG] 10:54:41.717 segment.go:SetEnabled:518 → Segment: Git
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[TRACE] 10:54:41.717 shell.go:Shell() - 0s
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.717 segment.go:SetEnabled:518 → Segment: Executiontime
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.717 properties.go:GetString:28 → environment
[DEBUG] 10:54:41.717 properties.go:GetBool:22 → always_enabled: false
[DEBUG] 10:54:41.717 segment.go:SetEnabled:518 → Segment: Shell
[TRACE] 10:54:41.717 shell.go:ExecutionTime() - 0s
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.717 properties.go:GetFloat64:34 → threshold: 500.000000
[DEBUG] 10:54:41.717 properties.go:GetKeyValueMap:46 → mapped_shell_names: map[]
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[DEBUG] 10:54:41.717 properties.go:GetBool:22 → mapped_locations_enabled: true
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:Shell() - 0s
[TRACE] 10:54:41.717 shell.go:Flags() - 0s
[DEBUG] 10:54:41.717 properties.go:GetString:28 → 
[DEBUG] 10:54:41.717 segment.go:SetEnabled:518 → Segment: Python
[TRACE] 10:54:41.717 shell.go:TemplateCache() - 0s
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.717 properties.go:GetString:28 → ~
[DEBUG] 10:54:41.717 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 10:54:41.717 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv venv-win pyenv-win]
[DEBUG] 10:54:41.717 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[DEBUG] 10:54:41.717 properties.go:GetBool:22 → home_enabled: false
[TRACE] 10:54:41.717 shell.go:PathSeparator() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.717 shell_windows.go:56 → C:\Users\david.eberhardt
[DEBUG] 10:54:41.717 properties.go:GetBool:22 → fetch_virtual_env: true
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:PathSeparator() - 0s
[TRACE] 10:54:41.717 shell.go:PathSeparator() - 0s
[TRACE] 10:54:41.717 shell.go:TemplateCache() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.717 properties.go:GetBool:22 → always_enabled: false
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:PathSeparator() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:PathSeparator() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:GOOS() - 0s
[TRACE] 10:54:41.717 shell.go:PathSeparator() - 0s
[DEBUG] 10:54:41.717 properties.go:GetString:28 → NO DATA
[TRACE] 10:54:41.717 shell.go:PathSeparator() - 0s
[DEBUG] 10:54:41.717 properties.go:GetString:28 →  
[TRACE] 10:54:41.717 shell.go:Pwd() - 0s
[TRACE] 10:54:41.717 shell_windows.go:IsWsl() - 0s
[TRACE] 10:54:41.717 shell.go:StackCount() - 0s
[DEBUG] 10:54:41.719 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 10:54:41.719 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 10:54:41.719 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 10:54:41.719 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 10:54:41.719 shell_windows.go:DirIsWritable() - 1.5571ms
[TRACE] 10:54:41.719 shell.go:TemplateCache() - 0s
[DEBUG] 10:54:41.721 shell.go:CommandPath:615 → C:\Program Files\Git\cmd\git.exe
[TRACE] 10:54:41.721 shell.go:CommandPath(git.exe) - 3.6454ms
[TRACE] 10:54:41.721 shell.go:HasCommand(git.exe) - 3.6454ms
[TRACE] 10:54:41.721 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.722 shell.go:CommandPath:615 → C:\Users\david.eberhardt\AppData\Local\Microsoft\WindowsApps\python.exe
[TRACE] 10:54:41.722 shell.go:CommandPath(python) - 4.1692ms
[ERROR] 10:54:41.722 shell.go:HasParentFilePath:758 → CreateFile .git: The system cannot find the file specified.
[TRACE] 10:54:41.722 shell.go:HasParentFilePath(.git) - 523.8µs
[DEBUG] 10:54:41.722 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 10:54:41.722 shell.go:HasFilesInDir:479 → false
[TRACE] 10:54:41.722 shell.go:HasFilesInDir(pyvenv.cfg) - 0s
[DEBUG] 10:54:41.722 shell.go:HasFilesInDir:479 → false
[TRACE] 10:54:41.722 shell.go:HasFilesInDir(pyvenv.cfg) - 0s
[DEBUG] 10:54:41.722 shell.go:Getenv:399 → NO DATA
[TRACE] 10:54:41.722 shell.go:Getenv(VIRTUAL_ENV) - 0s
[DEBUG] 10:54:41.722 shell.go:Getenv:399 → NO DATA
[TRACE] 10:54:41.722 shell.go:Getenv(CONDA_ENV_PATH) - 0s
[DEBUG] 10:54:41.722 shell.go:Getenv:399 → NO DATA
[TRACE] 10:54:41.722 shell.go:Getenv(CONDA_DEFAULT_ENV) - 0s
[DEBUG] 10:54:41.722 text.go:Render:70 → Rendering template:  {{ .Name }}
[DEBUG] 10:54:41.722 text.go:Render:70 → Rendering template:  {{ .Path }}
[TRACE] 10:54:41.722 shell.go:TemplateCache() - 0s
[TRACE] 10:54:41.722 shell.go:TemplateCache() - 0s
[TRACE] 10:54:41.722 shell.go:Shell() - 0s
[TRACE] 10:54:41.722 shell.go:Shell() - 0s
[DEBUG] 10:54:41.723 shell.go:Getenv:399 → vscode
[TRACE] 10:54:41.723 shell.go:Getenv(TERM_PROGRAM) - 512.2µs
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: powerline
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: powerline
[TRACE] 10:54:41.723 shell.go:Shell() - 0s
[TRACE] 10:54:41.723 shell.go:Shell() - 0s
[TRACE] 10:54:41.723 shell.go:Shell() - 0s
[TRACE] 10:54:41.723 shell.go:Flags() - 0s
[TRACE] 10:54:41.723 shell.go:Pwd() - 0s
[DEBUG] 10:54:41.723 shell_windows.go:56 → C:\Users\david.eberhardt
[TRACE] 10:54:41.723 shell.go:GOOS() - 0s
[DEBUG] 10:54:41.723 segment.go:SetEnabled:518 → Segment: Text
[TRACE] 10:54:41.723 shell.go:TemplateCache() - 0s
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: ❯
[TRACE] 10:54:41.723 shell.go:Shell() - 0s
[DEBUG] 10:54:41.723 shell.go:Getenv:399 → vscode
[TRACE] 10:54:41.723 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 10:54:41.723 text.go:Render:70 → Rendering template: plain
[TRACE] 10:54:41.723 shell.go:Shell() - 0s
[TRACE] 10:54:41.723 shell.go:Shell() - 0s
[TRACE] 10:54:41.723 shell.go:Shell() - 0s
[DEBUG] 10:54:41.723 shell.go:Getenv:399 → C:\Users\david.eberhardt\AppData\Local
[TRACE] 10:54:41.723 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 10:54:41.723 shell_windows.go:CachePath() - 0s
[TRACE] 10:54:41.723 shell.go:Flags() - 0s
JanDeDobbeleer commented 9 months ago

@DEberhardt I don't think we can solve that. This is a global function and probably that's not yet loaded due to they way you reload the profile. You're also the first with this issue it seems.