JanDeDobbeleer / oh-my-posh

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

omp.cache file has old cache entries which cause the prompt to intermittently malfunction #5656

Open chrisant996 opened 1 day ago

chrisant996 commented 1 day ago

Code of Conduct

What happened?

Hi @JanDeDobbeleer, I've reproduced this problem on both oh-my-posh v23.14.1 and v13.1.2, so this problem has been around for a long time.

My cmd process id is 42508. Running oh-my-posh print primary should use the default theme. But instead it uses a seemingly random theme. But only in one cmd.exe process -- in others it works as expected.

I believe I've tracked it down to a problem in how omp.cache is managed:

My omp.cache file has 153 entries. There's an entry for 42508, but it's from May 2022.

    "template_cache_42508": {
        "value": "{\"Root\":false,\"PWD\":\"C:\\\\wbin\\\\clink\",\"Folder\":\"clink\",\"Shell\":\"WindowsTerminal\",\"ShellVersion\":\"\",\"UserName\":\"chrisant\",\"HostName\":\"CHRISANT16\",\"Code\":0,\"Env\":{\"4DOS\":\"c:\\\\4dos\",\"ALLUSERSPROFILE\":\"C:\\\\ProgramData\",\"ANSICON\":\"1\",\"APPDATA\":\"C:\\\\Users\\\\chrisant\\\\AppData\\\\Roaming\",\"BAT\":\"c:\\\\4dos\",\"BBDIFF\":\"c:\\\\wbin\\\\x64\\\\sdvdiff.exe --sd\",\"BINNT\":\"c:\\\\binnt\",\"CLINK_BINDIR\":\"c:\\\\wbin\\\\clink\",\"CLINK_COMPLETIONS_DIR\":\"c:\\\\wbin\\\\clink\\\\completions\",\"CLINK_INPUTRC\":\"c:\\\\wbin\\\\clink\",\"CLINK_MYSTYLE\":\"bubbles\",\"COLUMNS\":\"120\",\"COMPUTERNAME\":\"CHRISANT16\",\"ChocolateyInstall\":\"C:\\\\ProgramData\\\\chocolatey\",\"ChocolateyLastPathUpdate\":\"133670655767495766\",\"ComSpec\":\"C:\\\\Windows\\\\system32\\\\cmd.exe\",\"CommonProgramFiles\":\"C:\\\\Program Files\\\\Common Files\",\"CommonProgramFiles(x86)\":\"C:\\\\Program Files (x86)\\\\Common Files\",\"CommonProgramW6432\":\"C:\\\\Program Files\\\\Common Files\",\"DIRX_NERD_FONTS_VERSION\":\"2\",\"DriverData\":\"C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData\",\"EXT\":\"c:\",\"FZF_ALT_C_COMMAND\":\"c:\\\\wbin\\\\dirx.exe /b /s /X:d /a:d-s-h --bare-relative --utf8 -- $dir\",\"FZF_COMPLETION_OPTS\":\"--preview-window \\\"right:40%,border-left\\\" --bind \\\"ctrl-/:change-preview-window(right:70%|hidden|)\\\" --bind \\\"shift-down:preview-down+preview-down\\\" --bind \\\"shift-up:preview-up+preview-up\\\" --bind \\\"preview-scroll-up:preview-up+preview-up\\\" --bind \\\"preview-scroll-down:preview-down+preview-down\\\" --preview \\\"fzf-preview.cmd {}\\\"\",\"FZF_CTRL_T_COMMAND\":\"c:\\\\wbin\\\\dirx.exe /b /s /X:d /a:-d-s-h --bare-relative --utf8 -- $dir\",\"FZF_CTRL_T_OPTS\":\"--preview-window \\\"right:40%,border-left\\\" --bind \\\"ctrl-/:change-preview-window(right:70%|hidden|)\\\" --bind \\\"shift-down:preview-down+preview-down\\\" --bind \\\"shift-up:preview-up+preview-up\\\" --bind \\\"preview-scroll-up:preview-up+preview-up\\\" --bind \\\"preview-scroll-down:preview-down+preview-down\\\" --preview \\\"fzf-preview.cmd {}\\\"\",\"FZF_DEFAULT_OPTS\":\"--color \\\"border:236,hl:164,hl+:164,fg+:232,bg+:252,gutter:236,info:33,pointer:9\\\"\",\"FZF_ICON_WIDTH\":\"\",\"HOMEDRIVE\":\"C:\",\"HOMEPATH\":\"\\\\Users\\\\chrisant\",\"JJPACK_DIFF\":\"c:\\\\wbin\\\\x64\\\\sdvdiff.exe\",\"LINES\":\"50\",\"LOCALAPPDATA\":\"C:\\\\Users\\\\chrisant\\\\AppData\\\\Local\",\"LOGONSERVER\":\"\\\\\\\\CHRISANT16\",\"MORE\":\"/E\",\"NUMBER_OF_PROCESSORS\":\"22\",\"OS\":\"Windows_NT\",\"OneDrive\":\"C:\\\\Users\\\\chrisant\\\\OneDrive\",\"OneDriveConsumer\":\"C:\\\\Users\\\\chrisant\\\\OneDrive\",\"PATHEXT\":\".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.LNK\",\"POSH_THEME\":\"c:\\\\wbin\\\\oh-my-posh\\\\lambdageneration.omp.json\",\"PROCESSOR_ARCHITECTURE\":\"AMD64\",\"PROCESSOR_IDENTIFIER\":\"Intel64 Family 6 Model 170 Stepping 4, GenuineIntel\",\"PROCESSOR_LEVEL\":\"6\",\"PROCESSOR_REVISION\":\"aa04\",\"PROMPT\":\"C\\u0008L\\u0008I\\u0008N\\u0008K\\u0008 \\u0008$+$p$g\",\"PSModulePath\":\"C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\Modules\",\"PUBLIC\":\"C:\\\\Users\\\\Public\",\"Path\":\"C:\\\\Python312\\\\Scripts\\\\;C:\\\\Python312\\\\;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)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Program Files\\\\NVIDIA Corporation\\\\NVIDIA NvDLISR;C:\\\\Program Files\\\\Git\\\\cmd;C:\\\\Program Files\\\\Microsoft SQL Server\\\\150\\\\Tools\\\\Binn\\\\;C:\\\\Program Files (x86)\\\\Windows Kits\\\\10\\\\Windows Performance Toolkit\\\\;C:\\\\Program Files\\\\nodejs\\\\;C:\\\\ProgramData\\\\chocolatey\\\\bin;C:\\\\Strawberry\\\\c\\\\bin;C:\\\\Strawberry\\\\perl\\\\site\\\\bin;C:\\\\Strawberry\\\\perl\\\\bin;C:\\\\Program Files\\\\GitHub CLI\\\\;c:\\\\sd\\\\default;c:\\\\4dos;c:\\\\chrisant\\\\vc;c:\\\\beta;c:\\\\wbin;c:\\\\wbin\\\\clink;c:\\\\binnt;c:\\\\sd\\\\SDPack;c:\\\\sd\\\\SDPack\\\\bin;C:\\\\Users\\\\chrisant\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;C:\\\\Users\\\\chrisant\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;C:\\\\Users\\\\chrisant\\\\.dotnet\\\\tools;C:\\\\Users\\\\chrisant\\\\AppData\\\\Local\\\\Microsoft\\\\WinGet\\\\Packages\\\\Schniz.fnm_Microsoft.Winget.Source_8wekyb3d8bbwe;C:\\\\Users\\\\chrisant\\\\AppData\\\\Roaming\\\\npm;C:\\\\Users\\\\chrisant\\\\AppData\\\\Local\\\\Microsoft\\\\WinGet\\\\Packages\\\\hpjansson.Chafa_Microsoft.Winget.Source_8wekyb3d8bbwe\\\\chafa-1.14.2-1-x86_64-win;\",\"ProgramData\":\"C:\\\\ProgramData\",\"ProgramFiles\":\"C:\\\\Program Files\",\"ProgramFiles(x86)\":\"C:\\\\Program Files (x86)\",\"ProgramW6432\":\"C:\\\\Program Files\",\"SDALIASES\":\"c:\\\\sd\\\\default\\\\sdaliases.ini\",\"SDBIN\":\"c:\\\\sd\\\\default\",\"SDFDIFF\":\"c:\\\\wbin\\\\x64\\\\sdvdiff.exe --sd -LO$c\",\"SDFFONT\":\"Fira Code NF,10\",\"SDFNOWRAP\":\"http\",\"SDPACKBIN\":\"c:\\\\sd\\\\SDPack\",\"SDPOPTIONS\":\"diff -du\",\"SDPWDIFF\":\"c:\\\\wbin\\\\x64\\\\sdvdiff.exe\",\"SDVCDIFF\":\"c:\\\\wbin\\\\x64\\\\sdvdiff.exe --sd -LD\",\"SDVDIFF\":\"c:\\\\wbin\\\\x64\\\\sdvdiff.exe --sd\",\"SESSIONNAME\":\"Console\",\"SystemDrive\":\"C:\",\"SystemRoot\":\"C:\\\\Windows\",\"TEMP\":\"c:\\\\tmp\\\\Temp\",\"TMP\":\"c:\\\\tmp\\\\Temp\",\"TSE\":\"c:\\\\beta\",\"USERDOMAIN\":\"CHRISANT16\",\"USERDOMAIN_ROAMINGPROFILE\":\"CHRISANT16\",\"USERNAME\":\"chrisant\",\"USERPROFILE\":\"C:\\\\Users\\\\chrisant\",\"WBIN\":\"c:\\\\wbin\",\"WSLENV\":\"WT_SESSION:WT_PROFILE_ID:\",\"WT_PROFILE_ID\":\"{55e9b923-7379-4015-8a31-7c40760a0635}\",\"WT_SESSION\":\"b2116767-3295-468b-8aa4-4fc70b7d9918\",\"ZES_ENABLE_SYSMAN\":\"1\",\"_ZL_ADD_ONCE\":\"1\",\"_ZL_FZF\":\"c:\\\\wbin\\\\fzf.exe\",\"_ZL_LUA_EXE\":\"c:\\\\wbin\\\\luabin\\\\lua52.exe\",\"_ZL_MAXAGE\":\"7500\",\"clink_dummy_capture_env\":\" \",\"windir\":\"C:\\\\Windows\"},\"OS\":\"windows\",\"WSL\":false,\"Segments\":{\"Battery\":{\"Percentage\":100,\"State\":2,\"Error\":\"\",\"Icon\":\" \"},\"Executiontime\":{\"FormattedMs\":\"0ms\",\"Ms\":0},\"Exit\":{\"Meaning\":\"0\"},\"Os\":{\"Icon\":\"\"},\"Path\":{\"Path\":\"C:\\\\..\\\\clink\",\"StackCount\":0,\"Location\":\"C:\\\\wbin\\\\clink\",\"Writable\":true,\"RootDir\":false},\"Session\":{\"SSHSession\":false,\"DefaultUserName\":\"\"},\"Time\":{\"CurrentDate\":\"2024-09-22T18:09:17.5193368-07:00\",\"Format\":\"15:04:05, _2\"}}}",
        "timestamp": 1727053757,
        "ttl": 1440
    },

The timestamp is from May 2022:

1653779745:  2022/05/28 23:15:45  [in UTC]
1653754545:  2022/05/28 16:15:45  [converted to Local]

The cached environment in the 42508 entry has \"POSH_THEME\":\"c:\\\\wbin\\\\oh-my-posh\\\\lambdageneration.omp.json\", and the omp program interprets that as meaning it should that theme for all cmd.exe processes that ever get assigned a process id 42508 by the OS.

At least on Windows, process id numbers are only unique at a given moment in time. 42508 could be the id of a cmd.exe, but once the cmd.exe process ends then the number can get assigned to any other new process (which may or may not be another cmd.exe process).

I don't know enough about how the omp.cache is used, so I don't know specifically what to suggest for how to solve the issue. I can help brainstorm solutions, if I know more about how it's used.

I assume the omp program has some upper bound for the number of cache entries it will keep, and presumably it ages out old entries.

Theme

That's the problem -- it's picking a theme by mistake from an old cache entry from May 2022. 🙃

What OS are you seeing the problem on?

Windows

Which shell are you using?

cmd

Log output

Version: 23.14.1

Shell: cmd

Prompt:

╭─   0ms  C:\wbin\clink   100                                            chrisant@CHRISANT16  18:59:56, 22  
╰─ﬦ

Segments:

ConsoleTitle(false)                        -   0 ms
Os(true)                                   -   2 ms
Executiontime(true)                        -   2 ms
Path(true)                                 -   4 ms
Battery(true)                              -  17 ms
Exit(true)                                 -   2 ms
Session(true)                              -   0 ms
Time(true)                                 -   0 ms
Path(true)                                 -   0 ms

Run duration: 50.1638ms

Cache path: C:\Users\chrisant\AppData\Local\oh-my-posh

Config path: c:\wbin\oh-my-posh\lambdageneration.omp.json

Logs:

[DEBUG] 18:59:56.847 debug.go:49 → debug mode enabled
[DEBUG] 18:59:56.848 debug.go:49 → plain mode enabled
[DEBUG] 18:59:56.848 terminal.go:Getenv:164 → C:\Users\chrisant\AppData\Local
[TRACE] 18:59:56.849 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 18:59:56.849 terminal.go:CachePath() - 518.1µs
[DEBUG] 18:59:56.849 terminal.go:70 → loading cache file: C:\Users\chrisant\AppData\Local\oh-my-posh\omp.cache
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_34168
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_2500
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_29860
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_35752
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_32808
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_34488
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_42152
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_24764
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_29320
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_35320
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_43228
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_9288
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_26580
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_30160
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_27344
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_40060
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_9420
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_18360
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_27316
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_30704
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_32976
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36424
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37588
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_38296
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_39456
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_13876
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_17068
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_41272
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_23080
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_29940
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_29968
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37116
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_42504
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_43408
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_20352
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_21116
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_30020
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_38624
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_17152
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_21832
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_28224
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36252
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_4484
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_5872
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_10100
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_12084
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_27764
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_35816
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_39156
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_14588
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_23044
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36636
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37784
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_41404
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_12836
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36452
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_6920
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_30428
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_43424
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_25264
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_39928
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_6204
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_11664
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_16524
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_24924
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_27044
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_39400
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_43576
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_7964
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_21420
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_22496
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_38612
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36484
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_38364
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_25860
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_32896
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36188
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_44020
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_13684
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_14236
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37640
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_40452
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_35216
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_35912
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_31520
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36140
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_39064
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_40284
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_960
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_13084
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_15424
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_13348
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_27620
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_38536
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_18900
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_19708
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_42816
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_29052
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36392
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_29784
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_33828
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37528
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_42228
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_9052
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_12976
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_25992
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_41972
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_42828
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_23220
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37516
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_26084
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_35372
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_39440
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_41488
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_41840
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_42176
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_17168
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_24728
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_25484
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_32060
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_3424
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36432
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_36796
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_5804
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_14592
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_17232
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_24604
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_6448
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_38264
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_41344
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_42508
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_22616
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_27448
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_31188
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_43728
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_28472
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_15568
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_21388
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_29716
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_31468
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_3460
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_7504
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_8868
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_16112
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_26372
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_44016
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_8380
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37696
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_42264
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37356
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_43944
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_35152
[DEBUG] 18:59:56.857 terminal.go:70 → loading cache key: template_cache_37348
[TRACE] 18:59:56.857 terminal.go(C:\Users\chrisant\AppData\Local\oh-my-posh\omp.cache) - 8.4534ms
[DEBUG] 18:59:56.857 terminal.go:Getenv:164 → C:\Users\chrisant\AppData\Local
[TRACE] 18:59:56.857 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 18:59:56.858 terminal.go:CachePath() - 1.0497ms
[DEBUG] 18:59:56.858 terminal.go:70 → loading cache file: C:\Users\chrisant\AppData\Local\oh-my-posh\omp.cache.42508
[ERROR] 18:59:56.859 terminal.go:70 → open C:\Users\chrisant\AppData\Local\oh-my-posh\omp.cache.42508: The system cannot find the file specified.
[TRACE] 18:59:56.859 terminal.go(C:\Users\chrisant\AppData\Local\oh-my-posh\omp.cache.42508) - 527.5µs
[TRACE] 18:59:56.859 terminal.go:setPromptCount() - 0s
[DEBUG] 18:59:56.859 terminal.go:Getenv:164 → c:\wbin\oh-my-posh\lambdageneration.omp.json
[TRACE] 18:59:56.859 terminal.go:Getenv(POSH_THEME) - 0s
[DEBUG] 18:59:56.859 terminal.go:ResolveConfigPath:96 → config set using POSH_THEME: c:\wbin\oh-my-posh\lambdageneration.omp.json
[TRACE] 18:59:56.859 terminal.go:ResolveConfigPath() - 0s
[TRACE] 18:59:56.859 terminal.go:Init() - 12.6625ms
[TRACE] 18:59:56.859 terminal.go:Flags() - 0s
[TRACE] 18:59:56.860 load.go:loadConfig() - 520.3µs
[TRACE] 18:59:56.860 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.860 debug.go:57 → terminal program: Windows Terminal
[DEBUG] 18:59:56.860 debug.go:57 → terminal shell: shell
[DEBUG] 18:59:56.860 terminal.go:Getenv:164 → NO DATA
[TRACE] 18:59:56.860 terminal.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 18:59:56.860 terminal_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.860 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.860 terminal_windows.go:WindowsRegistryKeyValue:215 → ColorizationColor(DWORD): 0xC4534588
[TRACE] 18:59:56.860 terminal.go:Shell() - 0s
[DEBUG] 18:59:56.860 terminal.go:Getenv:164 → NO DATA
[TRACE] 18:59:56.860 terminal.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 18:59:56.860 debug.go:PrintDebug:23 → segment: Title
[DEBUG] 18:59:56.860 text.go:Render:80 → rendering template:
[TRACE] 18:59:56.860 terminal.go:Flags() - 0s
[TRACE] 18:59:56.860 terminal.go:Shell() - 0s
[DEBUG] 18:59:56.860 terminal.go:Getenv:164 → NO DATA
[TRACE] 18:59:56.860 terminal.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 18:59:56.860 terminal.go:Getenv:164 → NO DATA
[TRACE] 18:59:56.860 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 18:59:56.860 terminal.go:Flags() - 0s
[TRACE] 18:59:56.860 terminal.go:Flags() - 0s
[TRACE] 18:59:56.861 terminal.go:Flags() - 0s
[TRACE] 18:59:56.860 terminal.go:Flags() - 0s
[TRACE] 18:59:56.860 terminal.go:Flags() - 0s
[TRACE] 18:59:56.861 terminal.go:Flags() - 0s
[TRACE] 18:59:56.861 terminal.go:Flags() - 0s
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.861 terminal.go:Flags() - 0s
[TRACE] 18:59:56.861 terminal.go:PathSeparator() - 0s
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.861 terminal.go:Pwd:189 → C:\wbin\clink
[TRACE] 18:59:56.861 terminal.go:Pwd() - 533.6µs
[DEBUG] 18:59:56.861 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.861 segment.go:SetEnabled:115 → segment: Executiontime
[TRACE] 18:59:56.861 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.861 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.861 segment.go:SetEnabled:115 → segment: Battery
[DEBUG] 18:59:56.861 status.go:Init:53 → {{ .Code }}
[TRACE] 18:59:56.861 terminal_windows.go:IsWsl() - 0s
[TRACE] 18:59:56.861 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.861 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.861 segment.go:SetEnabled:115 → segment: Exit
[TRACE] 18:59:56.861 terminal.go:StatusCodes() - 0s
[DEBUG] 18:59:56.861 text.go:Render:80 → rendering template: {{ .Code }}
[TRACE] 18:59:56.861 terminal.go:Flags() - 0s
[TRACE] 18:59:56.861 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.861 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.861 segment.go:SetEnabled:115 → segment: Root
[TRACE] 18:59:56.861 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.861 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.861 segment.go:SetEnabled:115 → segment: Path
[TRACE] 18:59:56.861 terminal.go:Pwd() - 0s
[TRACE] 18:59:56.861 terminal_windows.go:Root() - 0s
[DEBUG] 18:59:56.861 executiontime.go:Enabled:57 → always_enabled: true
[DEBUG] 18:59:56.861 path.go:149 → display_cygpath: false
[TRACE] 18:59:56.861 terminal.go:ExecutionTime() - 0s
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.861 terminal.go:PathSeparator() - 0s
[TRACE] 18:59:56.861 terminal.go:Pwd() - 0s
[TRACE] 18:59:56.861 terminal.go:Shell() - 0s
[DEBUG] 18:59:56.861 executiontime.go:Enabled:59 → threshold: 500.000000
[TRACE] 18:59:56.861 terminal.go:Shell() - 0s
[DEBUG] 18:59:56.861 executiontime.go:Enabled:63 → austin
[DEBUG] 18:59:56.861 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.861 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.861 segment.go:SetEnabled:115 → segment: Os
[TRACE] 18:59:56.861 terminal_windows.go:Root() - 0s
[TRACE] 18:59:56.862 terminal.go:Shell() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:StatusCodes() - 0s
[TRACE] 18:59:56.862 terminal_windows.go:IsWsl() - 0s
[DEBUG] 18:59:56.862 os.go:Enabled:34 → 
[TRACE] 18:59:56.862 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.862 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.862 segment.go:SetEnabled:115 → segment: Git
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.862 terminal.go:Getenv:164 → C:\Users\chrisant\AppData\Local
[TRACE] 18:59:56.862 terminal.go:Getenv(LOCALAPPDATA) - 0s
[DEBUG] 18:59:56.862 terminal.go:TemplateCache:651 → environment: [4DOS=c:\4dos =C:=c:\wbin\clink =clink.bin=c:\wbin\clink =clink.id=42508 =clink.profile=C:\Users\chrisant\AppData\Local\clink =clink.scripts= =cwdhistory_injected=1 =ExitCode=00000000 ALLUSERSPROFILE=C:\ProgramData ANSICON=1 APPDATA=C:\Users\chrisant\AppData\Roaming BAT=c:\4dos BBDIFF=c:\wbin\x64\sdvdiff.exe --sd BINNT=c:\binnt ChocolateyInstall=C:\ProgramData\chocolatey ChocolateyLastPathUpdate=133670655767495766 CLINK_BINDIR=c:\wbin\clink CLINK_COMPLETIONS_DIR=c:\wbin\clink\completions clink_dummy_capture_env=  CLINK_INPUTRC=c:\wbin\clink CLINK_MATCH_COLORS=di=93:ln=94:*.zip=36:ro=32:ro ex=92:ex=1:hi=91:*.arc=35:*.arj=35:*.lzh=35:*.rar=35:*.zoo=35:*.patch=96:*.diff=96:*.dpk=96 CLINK_MYSTYLE=bubbles COLUMNS=120 CommonProgramFiles=C:\Program Files (x86)\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=CHRISANT16 ComSpec=C:\Windows\system32\cmd.exe DIRX_COLORS=di=1;33:ro=32:ro ex=1;32:ex=1:co=35:hi=38;2;204;64;64:sy=38;2;204;64;64:*.zip=36:sn=38;5;244:nt=38;2;239;65;54:ng=38;2;252;176;64:nm=38;2;240;230;50:nk=38;2;142;198;64:nb=38;2;1;148;68:sb=38;5;240:ut=38;2;159;43;36:ug=38;2;168;117;42:um=38;2;160;153;33:uk=38;2;94;132;42:ub=38;2;0;98;45:da=38;5;33:hM=7:sc=33:bu=33;4:GO=7;38;2;204;204;0:ga=92:gm=38;5;33:gd=38;5;160:gv=93:gt=38;5;164:gi=90:gc=97;48;5;88 DIRX_NERD_FONTS_VERSION=2 DriverData=C:\Windows\System32\Drivers\DriverData EXT=c: FZF_ALT_C_COMMAND=c:\wbin\dirx.exe /b /s /X:d /a:d-s-h --bare-relative --utf8 -- $dir FZF_ALT_C_OPTS=--preview-window "right:40%,border-left" --bind "ctrl-/:change-preview-window(right:70%|hidden|)" --bind "shift-down:preview-down+preview-down" --bind "shift-up:preview-up+preview-up" --bind "preview-scroll-up:preview-up+preview-up" --bind "preview-scroll-down:preview-down+preview-down" --preview "dirx.exe -b -s --bare-relative --utf8 --level=3 --tree --escape-codes=always -- {}" FZF_COMPLETION_OPTS=--preview-window "right:40%,border-left" --bind "ctrl-/:change-preview-window(right:70%|hidden|)" --bind "shift-down:preview-down+preview-down" --bind "shift-up:preview-up+preview-up" --bind "preview-scroll-up:preview-up+preview-up" --bind "preview-scroll-down:preview-down+preview-down" --preview "fzf-preview.cmd {}" FZF_CTRL_T_COMMAND=c:\wbin\dirx.exe /b /s /X:d /a:-d-s-h --bare-relative --utf8 -- $dir FZF_CTRL_T_OPTS=--preview-window "right:40%,border-left" --bind "ctrl-/:change-preview-window(right:70%|hidden|)" --bind "shift-down:preview-down+preview-down" --bind "shift-up:preview-up+preview-up" --bind "preview-scroll-up:preview-up+preview-up" --bind "preview-scroll-down:preview-down+preview-down" --preview "fzf-preview.cmd {}" FZF_DEFAULT_OPTS=--color "border:236,hl:164,hl+:164,fg+:232,bg+:252,gutter:236,info:33,pointer:9" FZF_ICON_WIDTH= HOMEDRIVE=C: HOMEPATH=\Users\chrisant JJPACK_DIFF=c:\wbin\x64\sdvdiff.exe LINES=50 LOCALAPPDATA=C:\Users\chrisant\AppData\Local LOGONSERVER=\\CHRISANT16 LS_COLORS=di=93:ln=94:*.zip=36 MORE=/E NUMBER_OF_PROCESSORS=22 OneDrive=C:\Users\chrisant\OneDrive OneDriveConsumer=C:\Users\chrisant\OneDrive OS=Windows_NT Path=C:\Python312\Scripts\;C:\Python312\;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)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\GitHub CLI\;c:\sd\default;c:\4dos;c:\chrisant\vc;c:\beta;c:\wbin;c:\wbin\clink;c:\binnt;c:\sd\SDPack;c:\sd\SDPack\bin;C:\Users\chrisant\AppData\Local\Microsoft\WindowsApps;C:\Users\chrisant\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\chrisant\.dotnet\tools;C:\Users\chrisant\AppData\Local\Microsoft\WinGet\Packages\Schniz.fnm_Microsoft.Winget.Source_8wekyb3d8bbwe;C:\Users\chrisant\AppData\Roaming\npm;C:\Users\chrisant\AppData\Local\Microsoft\WinGet\Packages\hpjansson.Chafa_Microsoft.Winget.Source_8wekyb3d8bbwe\chafa-1.14.2-1-x86_64-win; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.LNK POSH_THEME=c:\wbin\oh-my-posh\lambdageneration.omp.json PROCESSOR_ARCHITECTURE=x86 PROCESSOR_ARCHITEW6432=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 170 Stepping 4, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=aa04 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files (x86) ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PROMPT=$+$p$g PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public SDALIASES=c:\sd\default\sdaliases.ini SDBIN=c:\sd\default SDFDIFF=c:\wbin\x64\sdvdiff.exe --sd -LO$c SDFFONT=Fira Code NF,10 SDFNOWRAP=http SDPACKBIN=c:\sd\SDPack SDPOPTIONS=diff -du SDPWDIFF=c:\wbin\x64\sdvdiff.exe SDVCDIFF=c:\wbin\x64\sdvdiff.exe --sd -LD SDVDIFF=c:\wbin\x64\sdvdiff.exe --sd SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\Windows TEMP=c:\tmp\Temp TMP=c:\tmp\Temp TSE=c:\beta USERDOMAIN=CHRISANT16 USERDOMAIN_ROAMINGPROFILE=CHRISANT16 USERNAME=chrisant USERPROFILE=C:\Users\chrisant WBIN=c:\wbin windir=C:\Windows WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID={55e9b923-7379-4015-8a31-7c40760a0635} WT_SESSION=b2116767-3295-468b-8aa4-4fc70b7d9918 ZES_ENABLE_SYSMAN=1 _ZL_ADD_ONCE=1 _ZL_FZF=c:\wbin\fzf.exe _ZL_LUA_EXE=c:\wbin\luabin\lua52.exe _ZL_MAXAGE=7500]
[DEBUG] 18:59:56.862 path.go:setMappedLocations:564 → 
[DEBUG] 18:59:56.862 path.go:setMappedLocations:565 → 
[TRACE] 18:59:56.862 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.862 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.862 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.862 terminal.go:PathSeparator() - 0s
[TRACE] 18:59:56.862 terminal_windows.go:IsWsl() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.862 terminal.go:User:330 → chrisant
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:User() - 0s
[DEBUG] 18:59:56.862 path.go:setMappedLocations:566 → ~
[DEBUG] 18:59:56.862 path.go:setMappedLocations:571 → mapped_locations: map[]
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:PathSeparator() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.862 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:PathSeparator() - 523.7µs
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.863 path.go:makeFolderFormatMap:839 → NO DATA
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.863 terminal.go:Host:347 → CHRISANT16
[DEBUG] 18:59:56.863 path.go:setStyle:218 → full
[TRACE] 18:59:56.863 terminal.go:Host() - 578.3µs
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.863 path.go:colorizePath:740 → cycle: []
[DEBUG] 18:59:56.863 terminal.go:Getenv:164 → NO DATA
[DEBUG] 18:59:56.863 path.go:getFolderSeparator:273 → NO DATA
[TRACE] 18:59:56.863 terminal.go:Getenv(SHLVL) - 0s
[DEBUG] 18:59:56.863 path.go:getFolderSeparator:275 → \
[DEBUG] 18:59:56.863 path.go:colorizePath:743 → cycle_folder_separator: false
[DEBUG] 18:59:56.863 path.go:colorizePath:744 → %s
[TRACE] 18:59:56.863 terminal.go:TemplateCache() - 1.6204ms
[DEBUG] 18:59:56.863 path.go:colorizePath:746 → %s
[DEBUG] 18:59:56.863 path.go:colorizePath:747 → %s
[DEBUG] 18:59:56.863 path.go:colorizePath:748 → %s
[TRACE] 18:59:56.863 terminal.go:TemplateCache() - 1.1008ms
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:Pwd() - 0s
[TRACE] 18:59:56.863 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.863 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.863 terminal.go:StackCount() - 0s
[DEBUG] 18:59:56.863 status.go:Enabled:42 → always_enabled: true
[TRACE] 18:59:56.863 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.865 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 18:59:56.865 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 18:59:56.866 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 18:59:56.866 terminal_windows.go:DirIsWritable() - 2.5927ms
[TRACE] 18:59:56.866 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.878 terminal_windows_nix.go:BatteryState() - 16.2525ms
[DEBUG] 18:59:56.878 battery.go:Enabled:59 → 
[TRACE] 18:59:56.878 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.892 terminal.go:CommandPath:389 → C:\Program Files\Git\cmd\git.exe
[TRACE] 18:59:56.892 terminal.go:CommandPath(git.exe) - 30.0302ms
[TRACE] 18:59:56.892 terminal.go:HasCommand(git.exe) - 30.0302ms
[DEBUG] 18:59:56.892 git.go:shouldDisplay:312 → fetch_bare_info: false
[TRACE] 18:59:56.892 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.893 terminal.go:ResolveSymlink:286 → C:\wbin\clink
[TRACE] 18:59:56.893 terminal.go:ResolveSymlink(C:\wbin\clink) - 103.8µs
[ERROR] 18:59:56.893 terminal.go:HasParentFilePath:553 → CreateFile .git: The system cannot find the file specified.
[TRACE] 18:59:56.893 terminal.go:HasParentFilePath(.git) - 610µs
[DEBUG] 18:59:56.893 text.go:Render:80 → rendering template:  {{ if gt .Code 0 }} {{ .Meaning }}{{ else }}{{ end }}
[TRACE] 18:59:56.893 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.893 text.go:Render:80 → rendering template:  {{ .FormattedMs }} 
[TRACE] 18:59:56.893 terminal.go:Flags() - 0s
[TRACE] 18:59:56.894 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.894 text.go:Render:80 → rendering template:  {{ if .WSL }}WSL at {{ end }}{{.Icon}} 
[TRACE] 18:59:56.894 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.894 text.go:Render:80 → rendering template:  {{ .Path }}
[DEBUG] 18:59:56.894 text.go:Render:80 → rendering template:  {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }} 
[TRACE] 18:59:56.894 terminal.go:Flags() - 0s
[TRACE] 18:59:56.894 terminal.go:Flags() - 0s
[TRACE] 18:59:56.894 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.894 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.894 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.894 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.894 text.go:Render:80 → rendering template: plain
[TRACE] 18:59:56.894 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.894 text.go:Render:80 → rendering template: plain
[TRACE] 18:59:56.894 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.894 text.go:Render:80 → rendering template: diamond
[TRACE] 18:59:56.894 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.894 text.go:Render:80 → rendering template: powerline
[TRACE] 18:59:56.894 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.894 text.go:Render:80 → rendering template: diamond
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.895 text.go:Render:80 → rendering template: {{ if eq "Full" .State.String }}#292929{{ end }}
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[TRACE] 18:59:56.895 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.895 text.go:Render:80 → rendering template: powerline
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.895 text.go:Render:80 → rendering template: {{ if eq "Full" .State.String }}#292929{{ end }}
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[TRACE] 18:59:56.895 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.895 text.go:Render:80 → rendering template: {{ if gt .Code 0 }}#292929{{ end }}
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[TRACE] 18:59:56.895 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.895 text.go:Render:80 → rendering template: diamond
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.895 text.go:Render:80 → rendering template: {{ if gt .Code 0 }}#292929{{ end }}
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[TRACE] 18:59:56.895 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.895 terminal.go:Shell() - 0s
[TRACE] 18:59:56.895 terminal.go:Shell() - 0s
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[TRACE] 18:59:56.895 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.895 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.895 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.895 segment.go:SetEnabled:115 → segment: Session
[DEBUG] 18:59:56.895 terminal.go:Getenv:164 → NO DATA
[TRACE] 18:59:56.895 terminal.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 18:59:56.895 terminal.go:Getenv:164 → NO DATA
[TRACE] 18:59:56.895 terminal.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 18:59:56.895 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[TRACE] 18:59:56.895 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.895 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.895 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.895 segment.go:SetEnabled:115 → segment: Time
[DEBUG] 18:59:56.895 time.go:Enabled:29 → 15:04:05, _2
[TRACE] 18:59:56.895 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.895 text.go:Render:80 → rendering template: {{ .CurrentDate | date .Format }} 
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.895 text.go:Render:80 → rendering template:  {{ if .SSHSession }} {{ end }}{{ .UserName }}@{{ .HostName }} <#fb7e14></>
[TRACE] 18:59:56.895 terminal.go:Flags() - 0s
[TRACE] 18:59:56.895 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.896 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.896 text.go:Render:80 → rendering template: diamond
[TRACE] 18:59:56.896 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.896 text.go:Render:80 → rendering template: diamond
[TRACE] 18:59:56.896 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.896 terminal_windows.go:TerminalWidth:116 → terminal width: 120
[TRACE] 18:59:56.896 terminal_windows.go:TerminalWidth() - 0s
[TRACE] 18:59:56.896 terminal.go:Shell() - 0s
[TRACE] 18:59:56.896 terminal.go:Shell() - 0s
[TRACE] 18:59:56.896 terminal.go:Flags() - 0s
[TRACE] 18:59:56.896 terminal.go:Pwd() - 0s
[DEBUG] 18:59:56.896 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.896 segment.go:SetEnabled:115 → segment: Path
[DEBUG] 18:59:56.896 path.go:149 → display_cygpath: false
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:PathSeparator() - 0s
[TRACE] 18:59:56.896 terminal.go:Pwd() - 0s
[TRACE] 18:59:56.896 terminal.go:Shell() - 0s
[TRACE] 18:59:56.896 terminal.go:Shell() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.896 path.go:setMappedLocations:563 → mapped_locations_enabled: true
[DEBUG] 18:59:56.896 path.go:setMappedLocations:564 → 
[DEBUG] 18:59:56.896 path.go:setMappedLocations:565 → 
[DEBUG] 18:59:56.896 terminal_windows.go:58 → C:\Users\chrisant
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:PathSeparator() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.896 path.go:setMappedLocations:566 → ~
[DEBUG] 18:59:56.896 path.go:setMappedLocations:571 → mapped_locations: map[]
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:PathSeparator() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:PathSeparator() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.896 path.go:makeFolderFormatMap:839 → NO DATA
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[DEBUG] 18:59:56.896 path.go:setStyle:218 → agnoster
[DEBUG] 18:59:56.896 path.go:getAgnosterPath:330 → ..
[DEBUG] 18:59:56.896 path.go:colorizePath:740 → cycle: []
[DEBUG] 18:59:56.896 path.go:getFolderSeparator:273 → NO DATA
[DEBUG] 18:59:56.896 path.go:getFolderSeparator:275 → \
[DEBUG] 18:59:56.896 path.go:colorizePath:743 → cycle_folder_separator: false
[DEBUG] 18:59:56.896 path.go:colorizePath:744 → %s
[DEBUG] 18:59:56.896 path.go:colorizePath:746 → %s
[DEBUG] 18:59:56.896 path.go:colorizePath:747 → %s
[DEBUG] 18:59:56.896 path.go:colorizePath:748 → %s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:Pwd() - 0s
[TRACE] 18:59:56.896 terminal.go:TemplateCache() - 0s
[TRACE] 18:59:56.896 terminal.go:GOOS() - 0s
[TRACE] 18:59:56.896 terminal.go:StackCount() - 0s
[DEBUG] 18:59:56.896 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 18:59:56.896 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 18:59:56.896 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 18:59:56.896 terminal_windows.go:DirIsWritable() - 0s
[TRACE] 18:59:56.896 terminal.go:TemplateCache() - 0s
[DEBUG] 18:59:56.896 text.go:Render:80 → rendering template: ﬦ
[TRACE] 18:59:56.896 terminal.go:Flags() - 0s
[DEBUG] 18:59:56.896 text.go:Render:80 → rendering template: diamond
[TRACE] 18:59:56.896 terminal.go:Flags() - 0s
[TRACE] 18:59:56.896 terminal.go:Shell() - 0s
[TRACE] 18:59:56.896 terminal.go:Shell() - 0s
[TRACE] 18:59:56.896 terminal.go:Shell() - 0s
[DEBUG] 18:59:56.897 terminal.go:Getenv:164 → C:\Users\chrisant\AppData\Local
[TRACE] 18:59:56.897 terminal.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 18:59:56.897 terminal.go:CachePath() - 519.8µs
[TRACE] 18:59:56.897 terminal.go:Flags() - 0s
chrisant996 commented 1 day ago

P.S. I'm working on adding support in Clink for easily switching back and forth between custom prompts, and I plan to include an oh-my-posh.clinkprompt module out of the box. I'm working on that module right now, which is the context under which I ran into the omp.cache problem.

lewis-yeung commented 1 day ago

@chrisant996 Since v22.3.0, cache files are split into session level (named as omp.cache.\) and device level (i.e., omp.cache), so even if entries like template_cache_<SESSION_ID> are left in the omp.cache file, they should have been no longer picked up by newer versions of OMP.

@JanDeDobbeleer As there is a chance that a session cache file named after PID (omp.cache.\) will be unexpectedly reused, we can use GUIDs as session IDs for all shells, which is robust and easy to implement.

chrisant996 commented 1 day ago

@lewis-yeung I recall originally it tried to use guids on Windows, but the guids were just random numbers, which are really pseudorandom numbers. And pseudorandom numbers are not really guids at all. They were getting reused and colliding often. I believe I'm the person who reported that problem originally, which led to using process ids instead. But process ids are not guid-like.

If you think it's robust and easy to implement guids that uniquely identify a process on Windows, I'd like to hear more about how. I'm not aware of any way to do that and satisfy both of the core requirements:

  1. Stable. The same guid must be generated repeatedly for the same process session (of the parent shell, not of omp).
  2. Long term unique. Never get used again, so that old stray guids lying around won't match any new sessions.

Maybe omp isn't finding the entries in omp.cache, maybe it's finding them in old omp.cache.SESSION_ID files. I don't know for sure which of those is happening, but the latest version of omp downloaded today is definitely still experiencing this problem.

Session ids don't have guid-like semantics, and can't be used as long term identifiers. When I had suggested using process id instead of unseeded pseudorandom number (which was always the same "random" number), I didn't realize that the id would be used as a long term identifier. I'm not aware of any way to have a reliable long term unique identifier of a process in Windows, so if you think you know a solution, I'd love to hear more.

JanDeDobbeleer commented 1 day ago

@chrisant996 I do think there's an issue in the cleanup of the cache in that case. I will fix that in #5414 where the caching of the environment variables is also removed. It also shouldn't load all that data, it's waste.

lewis-yeung commented 1 day ago

@chrisant996

They were getting reused and colliding often.

I know they're pseudorandom numbers, but still almost impossible to be duplicated in daily use. Maybe I'm dumb, but I don't quite understand why you mentioned that they collide OFTEN, even with 128-bit length?

The same guid must be generated repeatedly for the same process session (of the parent shell, not of omp).

The session ID will have been written into the environment POSH_PID after the initialization script is sourced in a CMD session, and later read to match the corresponding cache file whenever the OMP executable is called. So, there is no need to generate a GUID repeatedly for the same process.

chrisant996 commented 1 day ago

They were getting reused and colliding often.

I know they're pseudorandom numbers, but still almost impossible to be duplicated in daily use. I don't quite understand why you mentioned that they collide OFTEN, even with 128-bit length?

@lewis-yeung But when there is zero entropy, the number of bits is irrelevant. 😉

Refer to https://github.com/JanDeDobbeleer/oh-my-posh/issues/5182#issuecomment-2197452518.

Pseudorandom number generators produce the exact same sequence of numbers every single time, for a given seed. The default seed is a hard-coded constant. Omp did not apply a different seed. So, literally every single time it generated a guid, it generated the exact same guid.

But suppose omp wanted to apply a seed. Even if there's high entropy in the initial seed, the initial seed is only 32 bits. You can't get a full 128 bits of entropy from only 32 bits.

But pseudorandom numbers are only as strong as the initial seed. May as well skip calling rand() and simply use the initial seed itself as the GUID. So, how to pick a seed that has 128 bits worth of entropy in practice?

The entropy is what matters: you can produce as many bits as you want -- 256, 512, 4096, ... -- but if the math isn't sound, it will just be a very bloated representation of a much smaller range of actually reachable values. E.g. if you count from 0 to 1000 incrementing by 100, only 11 values are reachable even though the upper board of 1000 makes it sound like there are 1001 reachable values. The same kind of problem happens when trying to generate 128 bits worth of entropy from only 32 bits of input, or when using poor quality seeds.

Reading up on the pitfalls of pseudorandom number generators is interesting. For example, using them in card games is problematic because a large proportion of possible deck shuffles are mathematically unreachable (now, imagine if pseudorandom numbers were used in online gambling...problematic indeed!). Random number generation is a more nuanced and difficult topic than it might appear on the surface.

The same guid must be generated repeatedly for the same process session (of the parent shell, not of omp).

The session ID will be written into the environment POSH_PID once the initialization script has been sourced in a CMD session, and later read to match the corresponding cache file whenever the OMP executable is called. So, there is no need to generate a GUID repeatedly for the same process.

That gets tricky because environment variables are inherited. So when a first cmd.exe process spawns a second cmd.exe process, the second one inherits the POSH_PID from the first one. Checking whether POSH_PID already exists would not be sufficient.

But, maybe the requirements can be relaxed: Maybe it's ok to create a new GUID whenever the omp Lua script gets reloaded in the session? That won't be often, but it can definitely happen multiple times in a single cmd.exe process session. If omp can tolerate the POSH_PID periodically changing in a given session, then that would greatly simplify the problem.

But it needs to be some a real GUID from a library with strong guarantees, not a homegrown identifier. For example UuidCreateSequential or UuidCreate or CoCreateGuid would be suitable.

chrisant996 commented 1 day ago

In fact, I'm going to add Lua APIs in Clink to easily access UuidCreateSequential and UuidCreate, to efficiently and reliably produce proper GUIDs from inside Clink.

lewis-yeung commented 1 day ago

@chrisant996 Ah, I see, but the GUIDs I was talking about are real GUIDs/UUIDs (e.g., generated by APIs from a Go package, which would be reliable enough), not the implementation using math.random before #5183. Sorry for any confusion and thanks for providing details under the hood. I did learn something. :)

So when a first cmd.exe process spawns a second cmd.exe process, the second one inherits the POSH_PID from the first one. Checking whether POSH_PID already exists would not be sufficient.

That doesn't matter. OMP sets a unique POSH_PID (via the initialization script loaded) for each new CMD session before the initial prompt is ready.

Maybe it's ok to create a new GUID whenever the omp Lua script gets reloaded in the session? That won't be often, but it can definitely happen multiple times in a single cmd.exe process session. If omp can tolerate the POSH_PID periodically changing in a given session, then that would greatly simplify the problem.

Yes, it's just okay. Normally, the initialization Lua script will not be loaded more than once.

lewis-yeung commented 1 day ago

@JanDeDobbeleer As there is indeed an issue of outdated cache being reused unexpectedly, I have made a PR to use UUIDs for all supported shells.