安装 oh-my-posh 后,powershell 启动异常缓慢,且似乎受网络影响,网络正常时启动需 1900ms 左右:
试过将 oh-my-posh 加入 windows defender 等方法,似乎没有用
附上网络正常/断开时的 Debug 信息:
网络正常时:
Cache path: C:\Users\login\AppData\Local\oh-my-posh
Config path: C:\Users\login\AppData\Local\Programs\oh-my-posh\themes\cert.omp.json
Logs:
[DEBUG] 13:06:43.411 shell.go:Getenv:397 → NO DATA
[TRACE] 13:06:43.411 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 13:06:43.411 shell.go:Getenv:397 → C:\Users\login\AppData\Local
[TRACE] 13:06:43.411 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 13:06:43.411 shell_windows.go:CachePath() - 0s
[DEBUG] 13:06:43.412 shell.go:Getenv:397 → C:\Users\login\AppData\Local\Programs\oh-my-posh\themes\cert.omp.json
[TRACE] 13:06:43.412 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 13:06:43.440 shell.go:Shell:644 → process name: pwsh.exe
[TRACE] 13:06:43.440 shell.go:Shell() - 28.6409ms
[TRACE] 13:06:43.440 shell.go:resolveConfigPath() - 28.6409ms
[TRACE] 13:06:43.440 shell.go:Init() - 29.7168ms
[TRACE] 13:06:43.440 shell.go:Flags() - 0s
[TRACE] 13:06:43.441 config.go:loadConfig() - 523.2µs
[TRACE] 13:06:43.441 shell.go:Flags() - 0s
[DEBUG] 13:06:43.441 shell.go:Getenv:397 → NO DATA
[TRACE] 13:06:43.441 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 13:06:43.441 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[DEBUG] 13:06:43.441 shell_windows.go:WindowsRegistryKeyValue:206 → ColorizationColor(DWORD): 0xC40078D4
[TRACE] 13:06:43.441 shell.go:Shell() - 0s
[DEBUG] 13:06:43.441 shell.go:Getenv:397 → 7.3.6
[TRACE] 13:06:43.441 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 13:06:43.441 debug.go:PrintDebug:23 → Segment: Title
[TRACE] 13:06:43.441 shell.go:Flags() - 0s
[DEBUG] 13:06:43.441 block.go:Debug:280 → Segment: session
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[DEBUG] 13:06:43.441 shell.go:Pwd:427 → C:\Users\login
[TRACE] 13:06:43.441 shell.go:Pwd() - 0s
[DEBUG] 13:06:43.441 shell_windows.go:56 → C:\Users\login
[TRACE] 13:06:43.441 shell.go:GOOS() - 0s
[DEBUG] 13:06:43.441 shell.go:Getenv:397 → NO DATA
[TRACE] 13:06:43.441 shell.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 13:06:43.441 shell.go:Getenv:397 → NO DATA
[TRACE] 13:06:43.441 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 13:06:43.441 shell_windows.go:Root() - 0s
[TRACE] 13:06:43.441 shell.go:Shell() - 0s
[TRACE] 13:06:43.441 shell.go:ErrorCode() - 0s
[TRACE] 13:06:43.441 shell_windows.go:IsWsl() - 0s
[TRACE] 13:06:43.442 shell.go:Pwd() - 0s
[DEBUG] 13:06:43.442 shell_windows.go:56 → C:\Users\login
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[DEBUG] 13:06:43.442 shell.go:User:548 → login
[TRACE] 13:06:43.442 shell.go:User() - 0s
[DEBUG] 13:06:43.442 shell.go:Host:560 → Avalon
[TRACE] 13:06:43.442 shell.go:Host() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[DEBUG] 13:06:43.442 shell.go:Getenv:397 → NO DATA
[TRACE] 13:06:43.442 shell.go:Getenv(SHLVL) - 0s
[TRACE] 13:06:43.442 shell.go:TemplateCache() - 1.0664ms
[TRACE] 13:06:43.442 shell.go:TemplateCache() - 0s
[TRACE] 13:06:43.442 shell.go:Shell() - 0s
[DEBUG] 13:06:43.442 block.go:Debug:280 → Segment: path
[TRACE] 13:06:43.442 shell.go:Pwd() - 0s
[DEBUG] 13:06:43.442 shell_windows.go:56 → C:\Users\login
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:Pwd() - 0s
[TRACE] 13:06:43.442 shell.go:Shell() - 0s
[TRACE] 13:06:43.442 shell.go:Flags() - 0s
[DEBUG] 13:06:43.442 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 13:06:43.442 properties.go:GetString:28 →
[DEBUG] 13:06:43.442 properties.go:GetString:28 →
[DEBUG] 13:06:43.442 shell_windows.go:56 → C:\Users\login
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[DEBUG] 13:06:43.442 properties.go:GetString:28 → ~
[DEBUG] 13:06:43.442 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 13:06:43.442 shell.go:PathSeparator() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:PathSeparator() - 0s
[TRACE] 13:06:43.442 shell.go:PathSeparator() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:PathSeparator() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:PathSeparator() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:GOOS() - 0s
[TRACE] 13:06:43.442 shell.go:PathSeparator() - 0s
[TRACE] 13:06:43.442 shell.go:Pwd() - 0s
[TRACE] 13:06:43.442 shell_windows.go:IsWsl() - 0s
[TRACE] 13:06:43.442 shell.go:StackCount() - 0s
[DEBUG] 13:06:43.443 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 13:06:43.443 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 13:06:43.443 win32_windows.go:isWriteable:311 ↓
WRITE_DAC
WRITE_OWNER
SYNCHRONIZE
DELETE
READ_CONTROL
[DEBUG] 13:06:43.443 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 13:06:43.443 shell_windows.go:DirIsWritable() - 524µs
[TRACE] 13:06:43.443 shell.go:TemplateCache() - 0s
[TRACE] 13:06:43.443 shell.go:TemplateCache() - 0s
[TRACE] 13:06:43.443 shell.go:Shell() - 0s
[DEBUG] 13:06:43.443 block.go:Debug:280 → Segment: git
[TRACE] 13:06:43.443 shell.go:Pwd() - 0s
[DEBUG] 13:06:43.443 shell_windows.go:56 → C:\Users\login
[TRACE] 13:06:43.443 shell.go:GOOS() - 0s
[TRACE] 13:06:43.443 shell.go:GOOS() - 0s
[ERROR] 13:06:43.447 shell.go:CommandPath:602 → exec: "git.exe": executable file not found in %PATH%
[TRACE] 13:06:43.447 shell.go:CommandPath(git.exe) - 4.2052ms
[TRACE] 13:06:43.447 shell.go:HasCommand(git.exe) - 4.2052ms
[DEBUG] 13:06:43.447 block.go:Debug:280 → Segment: time
[TRACE] 13:06:43.447 shell.go:Pwd() - 0s
[DEBUG] 13:06:43.447 shell_windows.go:56 → C:\Users\login
[TRACE] 13:06:43.447 shell.go:GOOS() - 0s
[DEBUG] 13:06:43.447 properties.go:GetString:28 → 15:04
[TRACE] 13:06:43.447 shell.go:TemplateCache() - 0s
[TRACE] 13:06:43.448 shell.go:TemplateCache() - 0s
[TRACE] 13:06:43.448 shell.go:Shell() - 0s
[DEBUG] 13:06:43.448 shell.go:Getenv:397 → C:\Users\login\AppData\Local
[TRACE] 13:06:43.448 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 13:06:43.448 shell_windows.go:CachePath() - 0s
[TRACE] 13:06:43.448 shell.go:Flags() - 0s
网络断开时:
Cache path: C:\Users\login\AppData\Local\oh-my-posh
Config path: C:\Users\login\AppData\Local\Programs\oh-my-posh\themes\cert.omp.json
Logs:
[DEBUG] 13:08:36.385 shell.go:Getenv:397 → NO DATA
[TRACE] 13:08:36.385 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 13:08:36.385 shell.go:Getenv:397 → C:\Users\login\AppData\Local
[TRACE] 13:08:36.385 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 13:08:36.385 shell_windows.go:CachePath() - 0s
[DEBUG] 13:08:36.385 shell.go:Getenv:397 → C:\Users\login\AppData\Local\Programs\oh-my-posh\themes\cert.omp.json
[TRACE] 13:08:36.385 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 13:08:36.412 shell.go:Shell:644 → process name: pwsh.exe
[TRACE] 13:08:36.412 shell.go:Shell() - 26.4397ms
[TRACE] 13:08:36.412 shell.go:resolveConfigPath() - 26.4397ms
[TRACE] 13:08:36.412 shell.go:Init() - 26.9528ms
[TRACE] 13:08:36.412 shell.go:Flags() - 0s
[TRACE] 13:08:36.412 config.go:loadConfig() - 528.2µs
[TRACE] 13:08:36.412 shell.go:Flags() - 0s
[DEBUG] 13:08:36.412 shell.go:Getenv:397 → NO DATA
[TRACE] 13:08:36.412 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 13:08:36.412 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[DEBUG] 13:08:36.412 shell_windows.go:WindowsRegistryKeyValue:206 → ColorizationColor(DWORD): 0xC40078D4
[TRACE] 13:08:36.412 shell.go:Shell() - 0s
[DEBUG] 13:08:36.412 shell.go:Getenv:397 → 7.3.6
[TRACE] 13:08:36.412 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 13:08:36.412 debug.go:PrintDebug:23 → Segment: Title
[TRACE] 13:08:36.412 shell.go:Flags() - 0s
[DEBUG] 13:08:36.412 block.go:Debug:280 → Segment: session
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[DEBUG] 13:08:36.412 shell.go:Pwd:427 → C:\Users\login
[TRACE] 13:08:36.412 shell.go:Pwd() - 0s
[DEBUG] 13:08:36.412 shell_windows.go:56 → C:\Users\login
[TRACE] 13:08:36.412 shell.go:GOOS() - 0s
[DEBUG] 13:08:36.412 shell.go:Getenv:397 → NO DATA
[TRACE] 13:08:36.412 shell.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 13:08:36.412 shell.go:Getenv:397 → NO DATA
[TRACE] 13:08:36.412 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 13:08:36.413 shell_windows.go:Root() - 526.5µs
[TRACE] 13:08:36.413 shell.go:Shell() - 0s
[TRACE] 13:08:36.413 shell.go:ErrorCode() - 0s
[TRACE] 13:08:36.413 shell_windows.go:IsWsl() - 0s
[TRACE] 13:08:36.413 shell.go:Pwd() - 0s
[DEBUG] 13:08:36.413 shell_windows.go:56 → C:\Users\login
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[DEBUG] 13:08:36.413 shell.go:User:548 → login
[TRACE] 13:08:36.413 shell.go:User() - 0s
[DEBUG] 13:08:36.413 shell.go:Host:560 → Avalon
[TRACE] 13:08:36.413 shell.go:Host() - 0s
[TRACE] 13:08:36.413 shell.go:GOOS() - 0s
[DEBUG] 13:08:36.413 shell.go:Getenv:397 → NO DATA
[TRACE] 13:08:36.413 shell.go:Getenv(SHLVL) - 0s
[TRACE] 13:08:36.413 shell.go:TemplateCache() - 1.1125ms
[TRACE] 13:08:36.413 shell.go:TemplateCache() - 0s
[TRACE] 13:08:36.413 shell.go:Shell() - 0s
[DEBUG] 13:08:36.414 block.go:Debug:280 → Segment: path
[TRACE] 13:08:36.414 shell.go:Pwd() - 0s
[DEBUG] 13:08:36.414 shell_windows.go:56 → C:\Users\login
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:Pwd() - 0s
[TRACE] 13:08:36.414 shell.go:Shell() - 0s
[TRACE] 13:08:36.414 shell.go:Flags() - 0s
[DEBUG] 13:08:36.414 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 13:08:36.414 properties.go:GetString:28 →
[DEBUG] 13:08:36.414 properties.go:GetString:28 →
[DEBUG] 13:08:36.414 shell_windows.go:56 → C:\Users\login
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[DEBUG] 13:08:36.414 properties.go:GetString:28 → ~
[DEBUG] 13:08:36.414 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 13:08:36.414 shell.go:PathSeparator() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:PathSeparator() - 0s
[TRACE] 13:08:36.414 shell.go:PathSeparator() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:PathSeparator() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:PathSeparator() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:GOOS() - 0s
[TRACE] 13:08:36.414 shell.go:PathSeparator() - 0s
[TRACE] 13:08:36.414 shell.go:Pwd() - 0s
[TRACE] 13:08:36.414 shell_windows.go:IsWsl() - 0s
[TRACE] 13:08:36.414 shell.go:StackCount() - 0s
[DEBUG] 13:08:36.415 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 13:08:36.415 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 13:08:36.415 win32_windows.go:isWriteable:311 ↓
WRITE_DAC
WRITE_OWNER
SYNCHRONIZE
DELETE
READ_CONTROL
[DEBUG] 13:08:36.415 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 13:08:36.415 shell_windows.go:DirIsWritable() - 518.6µs
[TRACE] 13:08:36.415 shell.go:TemplateCache() - 0s
[TRACE] 13:08:36.415 shell.go:TemplateCache() - 0s
[TRACE] 13:08:36.415 shell.go:Shell() - 0s
[DEBUG] 13:08:36.415 block.go:Debug:280 → Segment: git
[TRACE] 13:08:36.415 shell.go:Pwd() - 0s
[DEBUG] 13:08:36.415 shell_windows.go:56 → C:\Users\login
[TRACE] 13:08:36.415 shell.go:GOOS() - 0s
[TRACE] 13:08:36.415 shell.go:GOOS() - 0s
[ERROR] 13:08:36.419 shell.go:CommandPath:602 → exec: "git.exe": executable file not found in %PATH%
[TRACE] 13:08:36.419 shell.go:CommandPath(git.exe) - 4.1797ms
[TRACE] 13:08:36.419 shell.go:HasCommand(git.exe) - 4.1797ms
[DEBUG] 13:08:36.419 block.go:Debug:280 → Segment: time
[TRACE] 13:08:36.419 shell.go:Pwd() - 0s
[DEBUG] 13:08:36.419 shell_windows.go:56 → C:\Users\login
[TRACE] 13:08:36.419 shell.go:GOOS() - 0s
[DEBUG] 13:08:36.419 properties.go:GetString:28 → 15:04
[TRACE] 13:08:36.419 shell.go:TemplateCache() - 0s
[TRACE] 13:08:36.419 shell.go:TemplateCache() - 0s
[TRACE] 13:08:36.419 shell.go:Shell() - 0s
[DEBUG] 13:08:36.419 shell.go:Getenv:397 → C:\Users\login\AppData\Local
[TRACE] 13:08:36.419 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 13:08:36.419 shell_windows.go:CachePath() - 0s
[TRACE] 13:08:36.419 shell.go:Flags() - 0s
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.