JanDeDobbeleer / oh-my-posh

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

The first letter cannot be deleted, however, it can be executed correctly. #5920

Closed grey6966 closed 4 days ago

grey6966 commented 4 days ago

Code of Conduct

What happened?

image

Theme

montys

What OS are you seeing the problem on?

No response

Which shell are you using?

No response

Log output

goh-my-posh debug --plain

Version: 24.6.5

Shell: pwsh (7.4.6)

Prompt:

 DESKTOP-H96JI4G    C:\IdeaProjects\data-sync  ➜ (   dev)   0ms   5:24 PM   
 ⚡jeeun ❯❯

Segments:

ConsoleTitle(false)                        -   0 ms
Os(true)                                   -   0 ms
Path(true)                                 -   1 ms
Git(true)                                  -   5 ms
Node(false)                                -   0 ms
Executiontime(true)                        -   0 ms
Time(true)                                 -   0 ms
Status(true)                               -   1 ms
Root(false)                                -   0 ms
Text(true)                                 -   0 ms

Run duration: 15.6131ms

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

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

Logs:

[DEBUG] 17:24:54.250 command.go:execute:989 → debug mode enabled
[DEBUG] 17:24:54.258 debug.go:40 → config set using POSH_THEME: C:\Users\jeeun\AppData\Local\Programs\oh-my-posh\themes\montys.omp.json
[TRACE] 17:24:54.258 debug.go() - 0s
[TRACE] 17:24:54.259 load.go:Load() - 1.1126ms
[TRACE] 17:24:54.259 debug.go() - 1.1126ms
[DEBUG] 17:24:54.259 debug.go:52 → plain mode enabled
[TRACE] 17:24:54.259 terminal.go() - 0s
[DEBUG] 17:24:54.259 terminal.go:59 → loading cache file: C:\Users\jeeun\AppData\Local\oh-my-posh\omp.cache
[TRACE] 17:24:54.259 terminal.go(C:\Users\jeeun\AppData\Local\oh-my-posh\omp.cache) - 0s
[TRACE] 17:24:54.259 terminal.go() - 0s
[DEBUG] 17:24:54.259 terminal.go:59 → loading cache file: C:\Users\jeeun\AppData\Local\oh-my-posh\omp.cache.603e2ede-f663-46ac-b506-cb7f29735402
[DEBUG] 17:24:54.259 terminal.go:59 → loading cache key: prompt_count_cache
[TRACE] 17:24:54.259 terminal.go(C:\Users\jeeun\AppData\Local\oh-my-posh\omp.cache.603e2ede-f663-46ac-b506-cb7f29735402) - 0s
[TRACE] 17:24:54.259 terminal.go:Init() - 0s
[TRACE] 17:24:54.259 terminal.go() - 0s
[DEBUG] 17:24:54.259 terminal.go:Init:67 → C:\IdeaProjects\data-sync
[TRACE] 17:24:54.259 terminal.go:Init() - 59.7µs
[TRACE] 17:24:54.259 debug.go() - 574.4µs
[TRACE] 17:24:54.259 init.go:Init() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[DEBUG] 17:24:54.259 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[DEBUG] 17:24:54.259 cache.go:loadCache:60 → jeeun
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[DEBUG] 17:24:54.259 cache.go:loadCache:61 → DESKTOP-H96JI4G
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[TRACE] 17:24:54.259 cache.go:loadCache() - 0s
[DEBUG] 17:24:54.259 cache.go:loadCache:71 → NO DATA
[TRACE] 17:24:54.259 cache.go:loadCache(SHLVL) - 0s
[DEBUG] 17:24:54.259 debug.go:61 → terminal program: Unknown
[DEBUG] 17:24:54.259 debug.go:61 → terminal shell: shell
[DEBUG] 17:24:54.259 config.go:MakeColors:56 → NO DATA
[TRACE] 17:24:54.259 config.go:MakeColors(OMP_CACHE_DISABLED) - 0s
[TRACE] 17:24:54.259 colors_windows.go:GetAccentColor(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[DEBUG] 17:24:54.259 colors_windows.go:GetAccentColor:19 → ColorizationColor(DWORD): 0xC40078D4
[TRACE] 17:24:54.259 colors.go:SetAccentColor() - 0s
[TRACE] 17:24:54.259 colors.go:MakeColors() - 0s
[TRACE] 17:24:54.260 debug.go:PrintDebug() - 0s
[DEBUG] 17:24:54.260 debug.go:PrintDebug:16 → 7.4.6
[TRACE] 17:24:54.260 debug.go:PrintDebug(POSH_SHELL_VERSION) - 0s
[DEBUG] 17:24:54.260 debug.go:72 → segment: Title
[TRACE] 17:24:54.260 engine.go:getTitleTemplateText() - 0s
[TRACE] 17:24:54.260 primary.go:needsPrimaryRightPrompt() - 0s
[DEBUG] 17:24:54.260 terminal.go:CursorPosition:590 → 21
[TRACE] 17:24:54.260 terminal.go:CursorPosition(POSH_CURSOR_LINE) - 0s
[DEBUG] 17:24:54.260 terminal.go:CursorPosition:594 → 1
[TRACE] 17:24:54.260 terminal.go:CursorPosition(POSH_CURSOR_COLUMN) - 0s
[TRACE] 17:24:54.260 primary.go:writePrimaryPrompt() - 0s
[TRACE] 17:24:54.260 primary.go:writePrimaryPrompt() - 0s
[TRACE] 17:24:54.260 segment.go:Execute() - 0s
[TRACE] 17:24:54.260 segment.go:Execute() - 0s
[TRACE] 17:24:54.260 segment.go:Execute() - 0s
[TRACE] 17:24:54.260 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 17:24:54.260 segment.go:Execute:109 → segment: Status
[DEBUG] 17:24:54.260 home.go:Home:26 → C:\Users\jeeun
[DEBUG] 17:24:54.260 segment.go:Execute:111 → no toggles found
[TRACE] 17:24:54.260 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 17:24:54.260 home.go:Home:26 → C:\Users\jeeun
[DEBUG] 17:24:54.260 segment.go:Execute:109 → segment: Git
[TRACE] 17:24:54.260 terminal.go:DirMatchesOneOf() - 0s
[TRACE] 17:24:54.260 status.go:Enabled() - 0s
[DEBUG] 17:24:54.260 segment.go:Execute:109 → segment: Executiontime
[DEBUG] 17:24:54.260 segment.go:Execute:111 → no toggles found
[DEBUG] 17:24:54.260 segment.go:Execute:111 → no toggles found
[DEBUG] 17:24:54.260 status.go:formatStatus:45 → {{ .Code }}
[TRACE] 17:24:54.260 scm.go:hasCommand() - 0s
[DEBUG] 17:24:54.260 executiontime.go:Enabled:55 → always_enabled: true
[TRACE] 17:24:54.260 executiontime.go:Enabled() - 0s
[DEBUG] 17:24:54.260 executiontime.go:Enabled:57 → threshold: 500.000000
[DEBUG] 17:24:54.260 executiontime.go:Enabled:61 → austin
[TRACE] 17:24:54.260 segment.go:Execute() - 0s
[DEBUG] 17:24:54.260 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.260 terminal.go:DirMatchesOneOf() - 0s
[TRACE] 17:24:54.260 segment.go:Execute() - 0s
[TRACE] 17:24:54.260 segment.go:Execute() - 0s
[DEBUG] 17:24:54.260 segment.go:Execute:111 → no toggles found
[DEBUG] 17:24:54.260 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.260 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 17:24:54.260 segment.go:Execute:109 → segment: Time
[DEBUG] 17:24:54.260 segment.go:Execute:111 → no toggles found
[DEBUG] 17:24:54.260 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.260 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 17:24:54.260 language.go:Enabled:118 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .vue]
[DEBUG] 17:24:54.260 segment.go:Execute:109 → segment: Os
[DEBUG] 17:24:54.260 time.go:Enabled:27 → 3:04 PM
[DEBUG] 17:24:54.260 language.go:Enabled:119 → folders: []
[DEBUG] 17:24:54.260 language.go:Enabled:126 → home_enabled: false
[DEBUG] 17:24:54.260 segment.go:Execute:111 → no toggles found
[TRACE] 17:24:54.260 segment.go:Execute() - 0s
[TRACE] 17:24:54.260 os.go:Enabled() - 0s
[DEBUG] 17:24:54.260 home.go:Home:26 → C:\Users\jeeun
[DEBUG] 17:24:54.260 os.go:Enabled:33 → 
[DEBUG] 17:24:54.260 language.go:Enabled:138 → files
[DEBUG] 17:24:54.260 node.go:loadContext:48 → fetch_package_manager: false
[DEBUG] 17:24:54.260 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.260 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 17:24:54.260 segment.go:Execute:109 → segment: Path
[DEBUG] 17:24:54.260 segment.go:Execute:111 → no toggles found
[DEBUG] 17:24:54.260 path.go:147 → display_cygpath: false
[TRACE] 17:24:54.260 path.go:setPaths() - 0s
[TRACE] 17:24:54.260 path.go:setPaths() - 0s
[TRACE] 17:24:54.260 path.go:setPaths() - 0s
[TRACE] 17:24:54.260 path.go:setPaths() - 0s
[TRACE] 17:24:54.260 path.go:parsePath() - 0s
[DEBUG] 17:24:54.260 terminal.go:HasFiles:114 → false
[TRACE] 17:24:54.260 terminal.go:HasFiles(*.js) - 0s
[DEBUG] 17:24:54.260 terminal.go:HasFiles:114 → false
[TRACE] 17:24:54.260 terminal.go:HasFiles(*.ts) - 0s
[DEBUG] 17:24:54.260 terminal.go:HasFiles:114 → false
[TRACE] 17:24:54.260 terminal.go:HasFiles(package.json) - 0s
[DEBUG] 17:24:54.260 terminal.go:HasFiles:114 → false
[TRACE] 17:24:54.260 terminal.go:HasFiles(.nvmrc) - 0s
[DEBUG] 17:24:54.260 terminal.go:HasFiles:114 → false
[TRACE] 17:24:54.260 terminal.go:HasFiles(pnpm-workspace.yaml) - 0s
[DEBUG] 17:24:54.260 terminal.go:HasFiles:114 → false
[TRACE] 17:24:54.260 terminal.go:HasFiles(.pnpmfile.cjs) - 0s
[DEBUG] 17:24:54.260 terminal.go:HasFiles:114 → false
[TRACE] 17:24:54.260 terminal.go:HasFiles(.vue) - 0s
[DEBUG] 17:24:54.260 path.go:setMappedLocations:557 → mapped_locations_enabled: true
[DEBUG] 17:24:54.260 path.go:setMappedLocations:558 → 
[DEBUG] 17:24:54.260 path.go:setMappedLocations:559 → 
[DEBUG] 17:24:54.261 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.261 clean.go:Clean() - 0s
[TRACE] 17:24:54.261 path.go:normalize() - 0s
[DEBUG] 17:24:54.261 path.go:setMappedLocations:560 → 
[DEBUG] 17:24:54.261 path.go:setMappedLocations:565 → mapped_locations: map[]
[TRACE] 17:24:54.261 clean.go:Clean() - 0s
[TRACE] 17:24:54.261 path.go:normalize() - 0s
[TRACE] 17:24:54.261 clean.go:Clean() - 0s
[TRACE] 17:24:54.261 path.go:normalize() - 0s
[TRACE] 17:24:54.261 path.go:parsePath() - 0s
[TRACE] 17:24:54.261 path.go:parsePath() - 0s
[TRACE] 17:24:54.261 path.go:parsePath() - 0s
[DEBUG] 17:24:54.261 path.go:makeFolderFormatMap:833 → NO DATA
[TRACE] 17:24:54.261 status.go:formatStatus({{ .Code }}) - 1.0371ms
[DEBUG] 17:24:54.261 path.go:colorizePath:734 → cycle: []
[DEBUG] 17:24:54.261 status.go:Enabled:37 → always_enabled: true
[DEBUG] 17:24:54.261 path.go:getFolderSeparator:267 → NO DATA
[DEBUG] 17:24:54.261 path.go:getFolderSeparator:269 → \
[DEBUG] 17:24:54.261 path.go:colorizePath:737 → cycle_folder_separator: false
[TRACE] 17:24:54.261 segment.go:string({{ .Icon }} {{ .HostName }} ) - 522.4µs
[DEBUG] 17:24:54.261 path.go:colorizePath:738 → %s
[DEBUG] 17:24:54.261 path.go:colorizePath:740 → %s
[DEBUG] 17:24:54.261 path.go:colorizePath:741 → %s
[TRACE] 17:24:54.261 segment.go:resolve(diamond) - 0s
[TRACE] 17:24:54.261 path.go:Enabled() - 0s
[TRACE] 17:24:54.261 path.go:Enabled() - 0s
[TRACE] 17:24:54.261 path.go:Enabled() - 0s
[DEBUG] 17:24:54.261 terminal_windows.go:DirIsWritable:216 → current user is member of S-1-5-32-544
[DEBUG] 17:24:54.261 win32_windows.go:isWriteable:271 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 17:24:54.261 terminal_windows.go:DirIsWritable:216 → user has write access
[TRACE] 17:24:54.261 path.go:Enabled() - 510.2µs
[TRACE] 17:24:54.261 segment.go:string( <#000> </> {{ .Path }} ) - 0s
[TRACE] 17:24:54.261 segment.go:resolve(powerline) - 0s
[DEBUG] 17:24:54.264 terminal.go:HasCommand:323 → C:\Program Files\Git\cmd\git.exe
[TRACE] 17:24:54.264 terminal.go:HasCommand(git.exe) - 4.6149ms
[TRACE] 17:24:54.264 scm.go:hasCommand(git.exe) - 4.6149ms
[DEBUG] 17:24:54.264 git.go:shouldDisplay:328 → fetch_bare_info: false
[DEBUG] 17:24:54.264 terminal.go:HasParentFilePath:453 → C:\IdeaProjects\data-sync
[TRACE] 17:24:54.264 terminal.go:HasParentFilePath(C:\IdeaProjects\data-sync) - 0s
[TRACE] 17:24:54.264 git.go:shouldDisplay(.git) - 0s
[DEBUG] 17:24:54.264 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.264 git.go:setDir() - 0s
[TRACE] 17:24:54.264 scm.go:convertToWindowsPath() - 0s
[DEBUG] 17:24:54.264 git.go:Enabled:174 → fetch_user: false
[DEBUG] 17:24:54.264 git.go:Enabled:189 → cli
[DEBUG] 17:24:54.264 git.go:Enabled:194 → fetch_status: false
[DEBUG] 17:24:54.264 git.go:shouldIgnoreStatus:466 → ignore_status: []
[DEBUG] 17:24:54.264 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.264 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 17:24:54.264 scm.go:FileContents:142 ↓
    ref: refs/heads/dev

[TRACE] 17:24:54.264 scm.go:FileContents(C:\IdeaProjects\data-sync\.git/HEAD) - 0s
[DEBUG] 17:24:54.264 git.go:setPrettyHEADName:817 →  <#ffffff> </>
[DEBUG] 17:24:54.264 scm.go:formatBranch:106 → mapped_branches: map[]
[DEBUG] 17:24:54.264 scm.go:formatBranch:122 → full_branch_path: true
[DEBUG] 17:24:54.264 scm.go:formatBranch:128 → branch_max_length: 0
[DEBUG] 17:24:54.264 git.go:Enabled:207 → fetch_upstream_icon: true
[DEBUG] 17:24:54.265 git.go:getUpstreamIcon:549 → upstream_icons: map[]
[DEBUG] 17:24:54.265 git.go:getUpstreamIcon:570 → 
[ERROR] 17:24:54.265 scm.go:FileContents:142 → open C:\IdeaProjects\data-sync\.git/logs/refs/stash: The system cannot find the file specified.
[TRACE] 17:24:54.265 scm.go:FileContents(C:\IdeaProjects\data-sync\.git/logs/refs/stash) - 0s
[TRACE] 17:24:54.265 segment.go:string( ➜ ({{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }}) ) - 0s
[TRACE] 17:24:54.265 segment.go:resolve(powerline) - 0s
[TRACE] 17:24:54.265 segment.go:resolve(powerline) - 0s
[TRACE] 17:24:54.265 segment.go:string(  {{ .FormattedMs }} ) - 0s
[TRACE] 17:24:54.265 segment.go:resolve(powerline) - 0s
[TRACE] 17:24:54.265 segment.go:string(  {{ .CurrentDate | date .Format }} ) - 0s
[TRACE] 17:24:54.265 segment.go:resolve(powerline) - 0s
[TRACE] 17:24:54.265 segment.go:string( {{ if gt .Code 0 }}{{ else }}{{ end }} ) - 0s
[TRACE] 17:24:54.265 list.go:FirstMatch({{ if gt .Code 0 }}red{{ end }}) - 0s
[TRACE] 17:24:54.265 segment.go:resolve(diamond) - 0s
[TRACE] 17:24:54.265 list.go:FirstMatch({{ if gt .Code 0 }}red{{ end }}) - 0s
[TRACE] 17:24:54.265 engine.go:applyPowerShellBleedPatch() - 0s
[TRACE] 17:24:54.265 segment.go:Execute() - 0s
[DEBUG] 17:24:54.265 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.265 segment.go:Execute() - 0s
[TRACE] 17:24:54.265 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 17:24:54.265 segment.go:Execute:109 → segment: Text
[DEBUG] 17:24:54.265 segment.go:Execute:111 → no toggles found
[DEBUG] 17:24:54.265 home.go:Home:26 → C:\Users\jeeun
[TRACE] 17:24:54.265 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 17:24:54.265 segment.go:Execute:109 → segment: Root
[DEBUG] 17:24:54.265 segment.go:Execute:111 → no toggles found
[TRACE] 17:24:54.265 root.go:Enabled() - 510.4µs
[TRACE] 17:24:54.265 segment.go:resolve(plain) - 0s
[TRACE] 17:24:54.265 segment.go:string( <#45F1C2><b>⚡</b></><b>{{ .UserName }}</b> <#26C6DA>❯</><#45F1C2>❯</>) - 0s
[TRACE] 17:24:54.265 segment.go:resolve(plain) - 0s
[TRACE] 17:24:54.265 engine.go:applyPowerShellBleedPatch() - 0s
[TRACE] 17:24:54.265 primary.go:Primary() - 0s
[TRACE] 17:24:54.265 debug.go:PrintDebug() - 0s
[TRACE] 17:24:54.265 debug.go:PrintDebug() - 0s
JanDeDobbeleer commented 4 days ago

@grey6966 tried to reproduce this, but I can't. As PSReadLine is responsible for this (and we don't really have a way to influence the cursor on PowerShell), please create a bug on their end.