JanDeDobbeleer / oh-my-posh

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

Error during debugging: cannot find .git file. #4450

Closed solo-driven closed 12 months ago

solo-driven commented 12 months ago

Code of Conduct

What happened?

Posh was quite slow, just pressing enter and executing simple commands like ls were takings a noticable time (~200ms). I tried to run debug and apparently it is mostly because of git (37ms in Segment section) and also this error:

[ERROR] 21:06:13.440 shell.go:HasParentFilePath:742 → CreateFile .git: The system cannot find the file specified.

Theme

oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/peru.omp.json" | Invoke-Expression

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

oh-my-posh debug

Version: 18.24.0

Shell: powershell (5.1.22621.2428)

Prompt:

~\Desktop ❯

Segments:

ConsoleTitle(false) -   0 ms
Os(true)            -   1 ms
Session(true)       -   1 ms
Python(false)       -   2 ms
Git(false)          -  37 ms
Node(false)         -   3 ms
Java(false)         -   4 ms
Status(true)        -   0 ms
Executiontime(false) -   0 ms
Time(true)          -   0 ms
Path(true)          -   1 ms
Text(true)          -   0 ms

Run duration: 105.9205ms

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

Config path: C:\Users\yusif\AppData\Local\Programs\oh-my-posh\themes\peru.omp.json

Logs:

[DEBUG] 21:06:13.343 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.343 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 21:06:13.343 shell.go:Getenv:392 → C:\Users\yusif\AppData\Local
[TRACE] 21:06:13.343 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 21:06:13.344 shell_windows.go:CachePath() - 607.4µs
[DEBUG] 21:06:13.365 shell.go:Getenv:392 → C:\Users\yusif\AppData\Local\Programs\oh-my-posh\themes\peru.omp.json
[TRACE] 21:06:13.365 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 21:06:13.365 shell.go:Shell:646 → no shell name provided in flags, trying to detect it
[DEBUG] 21:06:13.374 shell.go:Shell:654 → process name: powershell.exe
[TRACE] 21:06:13.374 shell.go:Shell() - 8.8063ms
[TRACE] 21:06:13.374 shell.go:resolveConfigPath() - 8.8063ms
[TRACE] 21:06:13.374 shell.go:Init() - 31.0135ms
[TRACE] 21:06:13.374 shell.go:Flags() - 0s
[TRACE] 21:06:13.402 config.go:loadConfig() - 27.8737ms
[TRACE] 21:06:13.402 shell.go:Flags() - 0s
[DEBUG] 21:06:13.402 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.402 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 21:06:13.402 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[TRACE] 21:06:13.402 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.403 shell_windows.go:WindowsRegistryKeyValue:215 → ColorizationColor(DWORD): 0xC44C4A48
[TRACE] 21:06:13.403 shell.go:Shell() - 0s
[DEBUG] 21:06:13.403 shell.go:Getenv:392 → 5.1.22621.2428
[TRACE] 21:06:13.403 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 21:06:13.403 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 21:06:13.403 text.go:Render:70 → Rendering template:
[DEBUG] 21:06:13.403 shell.go:Getenv:392 → 42
[TRACE] 21:06:13.403 shell.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 21:06:13.403 shell.go:Getenv:392 → 1
[TRACE] 21:06:13.403 shell.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 21:06:13.403 shell.go:Flags() - 0s
[TRACE] 21:06:13.403 shell.go:Flags() - 0s
[TRACE] 21:06:13.403 shell.go:Shell() - 0s
[TRACE] 21:06:13.403 shell.go:Shell() - 0s
[TRACE] 21:06:13.403 shell.go:Flags() - 0s
[TRACE] 21:06:13.403 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.403 shell.go:Pwd:422 → C:\Users\yusif\Desktop
[TRACE] 21:06:13.403 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.403 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.403 shell.go:GOOS() - 0s
[TRACE] 21:06:13.403 shell.go:Flags() - 0s
[DEBUG] 21:06:13.403 segment.go:SetEnabled:509 → Segment: Git
[TRACE] 21:06:13.403 shell.go:Pwd() - 0s
[TRACE] 21:06:13.403 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.403 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.403 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.403 segment.go:SetEnabled:509 → Segment: Session
[DEBUG] 21:06:13.403 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.403 shell.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 21:06:13.403 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.403 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 21:06:13.403 shell.go:Flags() - 0s
[TRACE] 21:06:13.403 shell_windows.go:Root() - 0s
[TRACE] 21:06:13.403 shell.go:Shell() - 0s
[TRACE] 21:06:13.403 shell.go:Pwd() - 0s
[TRACE] 21:06:13.403 shell.go:StatusCodes() - 0s
[TRACE] 21:06:13.403 shell_windows.go:IsWsl() - 0s
[DEBUG] 21:06:13.403 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.403 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.403 segment.go:SetEnabled:509 → Segment: Os
[TRACE] 21:06:13.403 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.403 properties.go:GetString:28 → 
[TRACE] 21:06:13.403 shell.go:Flags() - 0s
[DEBUG] 21:06:13.404 shell.go:TemplateCache:827 → environment: [ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\yusif\AppData\Roaming ChocolateyInstall=C:\ProgramData\chocolatey ChocolateyLastPathUpdate=133234464777591720 CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=DESKTOP-A0QKAFM ComSpec=C:\WINDOWS\system32\cmd.exe CONDA_PROMPT_MODIFIER=False DriverData=C:\Windows\System32\Drivers\DriverData GOPATH=C:\Users\yusif\go HOMEDRIVE=C: HOMEPATH=\Users\yusif IGCCSVC_DB=AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAFp1MfcQ4zUaxzf9YY3nSsQQAAAACAAAAAAAQZgAAAAEAACAAAACc4bLcVN3Y/UvabRebS07sp309jl/DHRnVgDNCaQmrywAAAAAOgAAAAAIAACAAAAAUyAvEj6/4pi+ruLWDKYFA2q6LLGnXBrCBaFqWFd3DtmAAAABG/FRXJ8YETYmNwJds2najmAqZUUEDK0RW4cpXsKUqVZcGdOj7c1qBze5+1koCPFsyUPIx4cRTNiBll7ncz2wXUIx+uOmghKF1Oy/VOW9ZmyoWQxisnNC/jZ4bS4TpMgVAAAAAaD3zG7r5xYY1bvWnpDXu7aEnBf3Ajk6Z1HCd7lMSANXUYEGq8t82vLIf3EPMAnPYgZSZgliCqjFi1++18s9jlw== IntelliJ IDEA=C:\Program Files\JetBrains\IntelliJ IDEA 2023.1\bin; JAVA_HOME=C:\Program Files\Java\jdk-17.0.5 LOCALAPPDATA=C:\Users\yusif\AppData\Local LOGONSERVER=\\DESKTOP-A0QKAFM NUMBER_OF_PROCESSORS=8 NVM_HOME=C:\Users\yusif\AppData\Roaming\nvm NVM_SYMLINK=C:\Program Files\nodejs OneDrive=C:\Users\yusif\OneDrive OS=Windows_NT Path=C:\Python311\Scripts\;C:\Python311\;C:\ffmpeg\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\WINDOWS\System32\OpenSSH\;C:\MinGW\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\ProgramData\chocolatey\bin;C:\Users\yusif\AppData\Roaming\nvm;C:\Program Files\Java\jdk-17.0.5\bin;C:\Program Files\kotlinc\bin;C:\Program Files\Kubernetes;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\Kubernetes\Minikube;C:\Program Files\Ngrok;C:\Program Files\PostgreSQL\15\bin;C:\Program Files\GitHub CLI\;C:\Program Files\Go\bin;C:\Program Files\PuTTY\;C:\Program Files\dotnet\;C:\Users\yusif\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\yusif\AppData\Local\Microsoft\WindowsApps;C:\Users\yusif\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\yusif\AppData\Local\Programs\MiKTeX\miktex\bin\x64\;C:\Users\yusif\flutter\bin;C:\Program Files\MySQL\MySQL Server 8.0\bin\;C:\Users\yusif\AppData\Roaming\npm;C:\Users\yusif\AppData\Roaming\nvm;C:\Program Files\JetBrains\IntelliJ IDEA 2023.1\bin;C:\Users\yusif\go\bin;C:\Users\yusif\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\yusif\AppData\Local\Programs\oh-my-posh\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL PGDATA=C:\Program Files\PostgreSQL\15\data POSH_AZURE_ENABLED=False POSH_CURSOR_COLUMN=1 POSH_CURSOR_LINE=42 POSH_GIT_ENABLED=False POSH_INSTALLER=winget POSH_PID=17164 POSH_SHELL_VERSION=5.1.22621.2428 POSH_THEME=C:\Users\yusif\AppData\Local\Programs\oh-my-posh\themes\peru.omp.json POSH_THEMES_PATH=C:\Users\yusif\AppData\Local\Programs\oh-my-posh\themes POWERLINE_COMMAND=oh-my-posh 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 PSModulePath=C:\Users\yusif\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules PT8HOME=C:\Program Files\Cisco Packet Tracer 8.2.1 PUBLIC=C:\Users\Public SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\yusif\AppData\Local\Temp TMP=C:\Users\yusif\AppData\Local\Temp USERDOMAIN=DESKTOP-A0QKAFM USERDOMAIN_ROAMINGPROFILE=DESKTOP-A0QKAFM USERNAME=yusif USERPROFILE=C:\Users\yusif windir=C:\WINDOWS WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID={61c54bbd-c2c6-5271-96e7-009a87ff44bf} WT_SESSION=10be0fd4-b105-4ebb-ac55-13ffc4d803d8 ZES_ENABLE_SYSMAN=1]
[TRACE] 21:06:13.404 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.404 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.404 properties.go:GetString:28 → environment
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.404 shell.go:User:557 → yusif
[TRACE] 21:06:13.404 shell.go:User() - 0s
[DEBUG] 21:06:13.404 shell.go:Host:569 → DESKTOP-A0QKAFM
[TRACE] 21:06:13.404 shell.go:Host() - 506.1µs
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.404 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.404 shell.go:Getenv(SHLVL) - 0s
[TRACE] 21:06:13.404 shell.go:TemplateCache() - 1.8087ms
[TRACE] 21:06:13.404 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.404 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.404 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.404 segment.go:SetEnabled:509 → Segment: Python
[DEBUG] 21:06:13.405 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 21:06:13.405 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv venv-win pyenv-win]
[DEBUG] 21:06:13.405 properties.go:GetBool:22 → home_enabled: false
[TRACE] 21:06:13.405 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.405 shell_windows.go:56 → C:\Users\yusif
[DEBUG] 21:06:13.405 properties.go:GetBool:22 → fetch_virtual_env: true
[DEBUG] 21:06:13.406 shell.go:CommandPath:608 → C:\Python311\python.exe
[TRACE] 21:06:13.406 shell.go:CommandPath(python) - 1.319ms
[DEBUG] 21:06:13.406 shell.go:HasFilesInDir:472 → false
[TRACE] 21:06:13.406 shell.go:HasFilesInDir(pyvenv.cfg) - 0s
[DEBUG] 21:06:13.406 shell.go:HasFilesInDir:472 → false
[TRACE] 21:06:13.406 shell.go:HasFilesInDir(pyvenv.cfg) - 0s
[DEBUG] 21:06:13.406 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.406 shell.go:Getenv(VIRTUAL_ENV) - 0s
[DEBUG] 21:06:13.406 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.406 shell.go:Getenv(CONDA_ENV_PATH) - 0s
[DEBUG] 21:06:13.406 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.406 shell.go:Getenv(CONDA_DEFAULT_ENV) - 0s
[DEBUG] 21:06:13.412 shell.go:CommandPath:608 → C:\Program Files\Git\cmd\git.exe
[TRACE] 21:06:13.412 shell.go:CommandPath(git.exe) - 9.0422ms
[TRACE] 21:06:13.412 shell.go:HasCommand(git.exe) - 9.0422ms
[TRACE] 21:06:13.412 shell.go:Pwd() - 0s
[ERROR] 21:06:13.440 shell.go:HasParentFilePath:742 → CreateFile .git: The system cannot find the file specified.
[TRACE] 21:06:13.440 shell.go:HasParentFilePath(.git) - 28.5078ms
[DEBUG] 21:06:13.440 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 21:06:13.441 text.go:Render:70 → Rendering template: {{ if .WSL }}WSL at {{ end }}{{.Icon}}
[DEBUG] 21:06:13.441 text.go:Render:70 → Rendering template: {{ .UserName }}@{{ .HostName }}
[TRACE] 21:06:13.441 shell.go:TemplateCache() - 0s
[TRACE] 21:06:13.441 shell.go:TemplateCache() - 0s
[TRACE] 21:06:13.441 shell.go:Shell() - 0s
[TRACE] 21:06:13.441 shell.go:Shell() - 0s
[DEBUG] 21:06:13.441 text.go:Render:70 → Rendering template: plain
[DEBUG] 21:06:13.441 text.go:Render:70 → Rendering template: diamond
[DEBUG] 21:06:13.441 text.go:Render:70 → Rendering template: powerline
[DEBUG] 21:06:13.441 text.go:Render:70 → Rendering template: plain
[TRACE] 21:06:13.441 shell.go:Shell() - 0s
[TRACE] 21:06:13.441 shell.go:Shell() - 0s
[TRACE] 21:06:13.441 shell.go:Shell() - 0s
[TRACE] 21:06:13.441 shell.go:Shell() - 0s
[TRACE] 21:06:13.441 shell.go:Flags() - 0s
[TRACE] 21:06:13.441 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.441 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.441 shell.go:GOOS() - 0s
[TRACE] 21:06:13.441 shell.go:Flags() - 0s
[DEBUG] 21:06:13.441 segment.go:SetEnabled:509 → Segment: Time
[TRACE] 21:06:13.441 shell.go:Flags() - 0s
[DEBUG] 21:06:13.441 shell.go:Getenv:392 → C:\Program Files\Java\jdk-17.0.5
[DEBUG] 21:06:13.441 properties.go:GetString:28 → 15:04:05
[TRACE] 21:06:13.441 shell.go:Getenv(JAVA_HOME) - 0s
[TRACE] 21:06:13.441 shell.go:Pwd() - 0s
[TRACE] 21:06:13.441 shell.go:TemplateCache() - 0s
[TRACE] 21:06:13.441 shell.go:Pwd() - 0s
[TRACE] 21:06:13.441 shell.go:Flags() - 0s
[DEBUG] 21:06:13.441 shell_windows.go:56 → C:\Users\yusif
[DEBUG] 21:06:13.441 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.441 shell.go:Flags() - 0s
[TRACE] 21:06:13.441 shell.go:GOOS() - 0s
[TRACE] 21:06:13.441 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.441 segment.go:SetEnabled:509 → Segment: Java
[DEBUG] 21:06:13.441 segment.go:SetEnabled:509 → Segment: Node
[DEBUG] 21:06:13.441 properties.go:GetString:28 → {{ .Code }}
[DEBUG] 21:06:13.441 properties.go:GetStringArray:52 → extensions: [pom.xml build.gradle.kts build.sbt .java-version .deps.edn project.clj build.boot *.java *.class *.gradle *.jar *.clj *.cljc]
[TRACE] 21:06:13.441 shell.go:Pwd() - 0s
[TRACE] 21:06:13.441 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.441 properties.go:GetStringArray:52 → folders: []
[DEBUG] 21:06:13.441 shell_windows.go:56 → C:\Users\yusif
[DEBUG] 21:06:13.441 properties.go:GetBool:22 → home_enabled: false
[TRACE] 21:06:13.441 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.441 shell_windows.go:56 → C:\Users\yusif
[DEBUG] 21:06:13.441 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.441 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.441 segment.go:SetEnabled:509 → Segment: Executiontime
[TRACE] 21:06:13.441 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.441 properties.go:GetString:28 → files
[DEBUG] 21:06:13.441 shell_windows.go:56 → C:\Users\yusif
[DEBUG] 21:06:13.441 properties.go:GetString:28 → files
[DEBUG] 21:06:13.441 segment.go:SetEnabled:509 → Segment: Status
[DEBUG] 21:06:13.441 properties.go:GetBool:22 → always_enabled: false
[TRACE] 21:06:13.441 shell.go:Pwd() - 0s
[TRACE] 21:06:13.441 shell.go:ExecutionTime() - 0s
[TRACE] 21:06:13.441 shell.go:StatusCodes() - 0s
[DEBUG] 21:06:13.442 text.go:Render:70 → Rendering template: {{ .Code }}
[DEBUG] 21:06:13.441 properties.go:GetBool:22 → fetch_package_manager: false
[TRACE] 21:06:13.442 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.442 properties.go:GetFloat64:34 → threshold: 10.000000
[TRACE] 21:06:13.442 shell.go:TemplateCache() - 0s
[DEBUG] 21:06:13.442 properties.go:GetBool:22 → always_enabled: true
[TRACE] 21:06:13.442 shell.go:TemplateCache() - 0s
[DEBUG] 21:06:13.442 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.442 shell.go:HasFiles(*.js) - 0s
[TRACE] 21:06:13.442 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.442 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.442 shell.go:HasFiles(pom.xml) - 522.6µs
[TRACE] 21:06:13.442 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.442 shell.go:HasFiles:458 → false
[DEBUG] 21:06:13.442 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.443 shell.go:HasFiles(build.gradle.kts) - 1.0673ms
[TRACE] 21:06:13.443 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.443 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.443 shell.go:HasFiles(.nvmrc) - 468.2µs
[TRACE] 21:06:13.443 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.444 shell.go:HasFiles:458 → false
[DEBUG] 21:06:13.444 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.444 shell.go:HasFiles(pnpm-workspace.yaml) - 505.3µs
[TRACE] 21:06:13.444 shell.go:Pwd() - 0s
[TRACE] 21:06:13.444 shell.go:HasFiles(build.sbt) - 505.3µs
[TRACE] 21:06:13.444 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.444 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.444 shell.go:HasFiles(.pnpmfile.cjs) - 525.5µs
[TRACE] 21:06:13.444 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.444 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.444 shell.go:HasFiles(.java-version) - 525.5µs
[DEBUG] 21:06:13.444 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.444 shell.go:HasFiles(.npmrc) - 0s
[TRACE] 21:06:13.444 shell.go:Pwd() - 0s
[TRACE] 21:06:13.444 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.444 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.444 shell.go:HasFiles(.vue) - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(.deps.edn) - 538.2µs
[TRACE] 21:06:13.445 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(project.clj) - 0s
[TRACE] 21:06:13.445 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(build.boot) - 0s
[TRACE] 21:06:13.445 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(*.java) - 0s
[TRACE] 21:06:13.445 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(*.class) - 607.6µs
[TRACE] 21:06:13.445 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(*.gradle) - 0s
[TRACE] 21:06:13.445 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(*.jar) - 0s
[TRACE] 21:06:13.445 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(*.clj) - 0s
[TRACE] 21:06:13.445 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.445 shell.go:HasFiles:458 → false
[TRACE] 21:06:13.445 shell.go:HasFiles(*.cljc) - 0s
[DEBUG] 21:06:13.445 text.go:Render:70 → Rendering template:  {{ .CurrentDate | date .Format }} 
[DEBUG] 21:06:13.446 text.go:Render:70 → Rendering template:  {{ if gt .Code 0 }}<#ff0000></>{{ else }}<#23d18b></>{{ end }}
[TRACE] 21:06:13.446 shell.go:TemplateCache() - 0s
[TRACE] 21:06:13.446 shell.go:Shell() - 0s
[TRACE] 21:06:13.446 shell.go:TemplateCache() - 0s
[TRACE] 21:06:13.446 shell.go:Shell() - 0s
[DEBUG] 21:06:13.446 text.go:Render:70 → Rendering template: diamond
[DEBUG] 21:06:13.446 text.go:Render:70 → Rendering template: diamond
[DEBUG] 21:06:13.446 text.go:Render:70 → Rendering template: plain
[DEBUG] 21:06:13.446 text.go:Render:70 → Rendering template: plain
[DEBUG] 21:06:13.446 text.go:Render:70 → Rendering template: plain
[TRACE] 21:06:13.446 shell.go:Shell() - 0s
[DEBUG] 21:06:13.447 shell_windows.go:TerminalWidth:109 → terminal width: 158
[TRACE] 21:06:13.447 shell_windows.go:TerminalWidth() - 506.5µs
[TRACE] 21:06:13.447 shell.go:Shell() - 0s
[TRACE] 21:06:13.447 shell.go:Shell() - 0s
[TRACE] 21:06:13.447 shell.go:Shell() - 0s
[TRACE] 21:06:13.447 shell.go:Shell() - 0s
[TRACE] 21:06:13.447 shell.go:Flags() - 0s
[TRACE] 21:06:13.447 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.447 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.447 segment.go:SetEnabled:509 → Segment: Text
[TRACE] 21:06:13.447 shell.go:Flags() - 0s
[TRACE] 21:06:13.447 shell.go:TemplateCache() - 0s
[TRACE] 21:06:13.447 shell.go:Pwd() - 0s
[DEBUG] 21:06:13.447 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.447 segment.go:SetEnabled:509 → Segment: Path
[TRACE] 21:06:13.447 shell.go:Pwd() - 0s
[TRACE] 21:06:13.447 shell.go:Shell() - 0s
[TRACE] 21:06:13.447 shell.go:Shell() - 0s
[TRACE] 21:06:13.447 shell.go:Flags() - 0s
[DEBUG] 21:06:13.447 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 21:06:13.447 properties.go:GetString:28 → 
[DEBUG] 21:06:13.447 properties.go:GetString:28 → 
[DEBUG] 21:06:13.447 shell_windows.go:56 → C:\Users\yusif
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[DEBUG] 21:06:13.447 properties.go:GetString:28 → ~
[DEBUG] 21:06:13.447 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:GOOS() - 0s
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[DEBUG] 21:06:13.447 properties.go:GetString:28 → full
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[DEBUG] 21:06:13.447 properties.go:GetStringArray:52 → cycle: []
[DEBUG] 21:06:13.447 properties.go:GetString:28 → NO DATA
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[DEBUG] 21:06:13.447 properties.go:GetString:28 → \
[DEBUG] 21:06:13.447 properties.go:GetBool:22 → cycle_folder_separator: false
[DEBUG] 21:06:13.447 properties.go:GetString:28 → %s
[DEBUG] 21:06:13.447 properties.go:GetString:28 → %s
[TRACE] 21:06:13.447 shell.go:PathSeparator() - 0s
[TRACE] 21:06:13.447 shell.go:Pwd() - 0s
[TRACE] 21:06:13.447 shell_windows.go:IsWsl() - 0s
[TRACE] 21:06:13.447 shell.go:StackCount() - 0s
[DEBUG] 21:06:13.448 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 21:06:13.448 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 21:06:13.448 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 21:06:13.448 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 21:06:13.448 shell_windows.go:DirIsWritable() - 1.2128ms
[TRACE] 21:06:13.448 shell.go:TemplateCache() - 0s
[DEBUG] 21:06:13.448 text.go:Render:70 → Rendering template: ❯
[TRACE] 21:06:13.448 shell.go:Shell() - 0s
[DEBUG] 21:06:13.448 text.go:Render:70 → Rendering template: {{ .Path }}
[TRACE] 21:06:13.448 shell.go:TemplateCache() - 0s
[TRACE] 21:06:13.449 shell.go:Shell() - 0s
[DEBUG] 21:06:13.449 shell.go:Getenv:392 → NO DATA
[TRACE] 21:06:13.449 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 21:06:13.449 text.go:Render:70 → Rendering template: plain
[DEBUG] 21:06:13.449 text.go:Render:70 → Rendering template: plain
[TRACE] 21:06:13.449 shell.go:Shell() - 0s
[TRACE] 21:06:13.449 shell.go:Shell() - 0s
[TRACE] 21:06:13.449 shell.go:Shell() - 0s
[TRACE] 21:06:13.449 shell.go:Shell() - 0s
[DEBUG] 21:06:13.449 shell.go:Getenv:392 → C:\Users\yusif\AppData\Local
[TRACE] 21:06:13.449 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 21:06:13.449 shell_windows.go:CachePath() - 0s
[TRACE] 21:06:13.449 shell.go:Flags() - 0s
JanDeDobbeleer commented 12 months ago

37ms is nothing. That's milliseconds so can't give the impression of being slow. The executable being blocked is more likely.

solo-driven commented 12 months ago

Okay, but what about the error?

solo-driven commented 12 months ago

Okay, but what about the error?

[ERROR] 21:39:56.804 shell.go:FileContent:527 → open C:\SOME_DIR\ .git/logs/refs/stash: The system cannot find the file specified. When I run debug in a dir where git is initialized

thiagoszbarros commented 12 months ago

Maybe should you give more attention to the path shown on error... \ to me seems like windows and / seems like linux.

JanDeDobbeleer commented 12 months ago

@thiagoszbarros for path matching that doesn't matter. This works regardless, Windows can handle both and even combinations. So path conversions would be purely esthetic and waste of CPU cycles. All that error implies is that there's no stash found for that repo. Could be informative, but the higher level function logs that as an error as it receives an error. It's perfectly normal, and not something that causes the slowness. There, you would have to look at Defender or a virus scanner blocking oh-my-posh' execution.

Additionally, the 100ms run time is also caused by debug alone as the shell isn't provided. On init, and subsequent calls this is provided. If you want to see the real time oh-my-posh takes, run oh-my-posh debug --shell pwsh. Those timings are inside the executable, as soon as the OS loaded it into memory and it starts running. All other additions to timings are the OS' influence (or something running on the OS).