Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The git segment doesn't render correctly when switching to a shorter branch name #4839

Closed
1 task done
niaodan2b opened this issue Apr 15, 2024 · 7 comments
Closed
1 task done
Assignees
Labels
🐛 bug Something isn't working 🏝 external The issue isn't with oh-my-posh

Comments

@niaodan2b
Copy link

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

When I switch to a branch with shorter name than current, part of the current branch name remains. No problem when switching to a longer branch name.

PixPin_2024-04-15_10-33-33

Theme

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "alignment": "left",
      "segments": [
        {
          "foreground": "yellow",
          "style": "plain",
          "template": " \ue0a2 ",
          "type": "root"
        },
        {
          "background": "lightBlue",
          "foreground": "black",
          "leading_diamond": "\ue0b6",
          "properties": {
            "style": "full"
          },
          "style": "diamond",
          "template": " {{ .Path }} ",
          "trailing_diamond": "\ue0b0",
          "type": "path"
        },
        {
          "background": "green",
          "background_templates": [
            "{{ if or (.Working.Changed) (.Staging.Changed) }}yellow{{ end }}"
          ],
          "foreground": "black",
          "powerline_symbol": "\ue0b0",
          "properties": {
            "branch_ahead_icon": "\u2191",
            "branch_behind_icon": "\u2193",
            "branch_gone": "\u2262",
            "branch_icon": "\ue0a0 ",
            "branch_identical_icon": "\u2261",
            "cherry_pick_icon": "\u2713 ",
            "commit_icon": "\u25b7 ",
            "fetch_status": true,
            "merge_icon": "\u25f4 ",
            "no_commits_icon": "[no commits]",
            "rebase_icon": "\u2c62 ",
            "tag_icon": "\u25b6 "
          },
          "style": "powerline",
          "template": " {{ .HEAD }}{{ if or (gt .Ahead 0) (gt .Behind 0) }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }} ",
          "type": "git"
        }
      ],
      "type": "prompt"
    },
    {
      "alignment": "left",
      "newline": true,
      "segments": [
        {
          "foreground": "blue",
          "style": "plain",
          "template": "\u2570\u2500",
          "type": "text"
        },
        {
          "foreground": "red",
          "style": "plain",
          "template": "$",
          "type": "text"
        }
      ],
      "type": "prompt"
    }
  ],
  "console_title_template": "{{.Folder}}{{if .Root}} :: root{{end}}",
  "final_space": true,
  "version": 2
}

What OS are you seeing the problem on?

Windows

Which shell are you using?

cmd

Log output

Version: 19.20.0

Shell: cmd (clink v1.6.11.5e960c)

Prompt:

 D:\Code\standard-admin   standard 
╰─$

Segments:

ConsoleTitle(true)                        -   0 ms
Root(false)                               -   0 ms
Path(true)                                -   1 ms
Git(true)                                 - 149 ms
Text(true)                                -   0 ms
Text(true)                                -   0 ms

Run duration: 194.6706ms

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

Config path: C:\Users\Niaodan\tools\hotstick.minimal.omp.json

Logs:

[DEBUG] 10:43:45.753 shell.go:Getenv:325 → NO DATA
[TRACE] 10:43:45.791 shell.go:Getenv(TERM_PROGRAM) - 38.2214ms
[DEBUG] 10:43:45.791 shell.go:Getenv:325 → C:\Users\Niaodan\AppData\Local
[TRACE] 10:43:45.791 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 10:43:45.791 shell_windows.go:CachePath() - 0s
[DEBUG] 10:43:45.791 shell.go:Getenv:325 → C:\Users\Niaodan\tools\hotstick.minimal.omp.json
[TRACE] 10:43:45.791 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 10:43:45.791 shell.go:Shell:593 → no shell name provided in flags, trying to detect it
[DEBUG] 10:43:45.796 shell.go:Shell:601 → process name: cmd.exe
[TRACE] 10:43:45.796 shell.go:Shell() - 4.6236ms
[TRACE] 10:43:45.796 shell.go:resolveConfigPath() - 4.6236ms
[TRACE] 10:43:45.796 shell.go:Init() - 43.368ms
[TRACE] 10:43:45.796 shell.go:Flags() - 0s
[TRACE] 10:43:45.797 config.go:loadConfig() - 579.5µs
[TRACE] 10:43:45.797 shell.go:Flags() - 0s
[DEBUG] 10:43:45.797 shell.go:Getenv:325 → NO DATA
[TRACE] 10:43:45.797 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 10:43:45.797 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 shell_windows.go:WindowsRegistryKeyValue:217 → ColorizationColor(DWORD): 0xC40078D4
[TRACE] 10:43:45.797 shell.go:Shell() - 0s
[DEBUG] 10:43:45.797 shell.go:Getenv:325 → clink v1.6.11.5e960c
[TRACE] 10:43:45.797 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 10:43:45.797 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 10:43:45.797 text.go:Render:70 → Rendering template: {{.Folder}}{{if .Root}} :: root{{end}}
[TRACE] 10:43:45.797 shell_windows.go:Root() - 504.7µs
[TRACE] 10:43:45.797 shell.go:Shell() - 0s
[TRACE] 10:43:45.797 shell.go:StatusCodes() - 0s
[TRACE] 10:43:45.797 shell_windows.go:IsWsl() - 0s
[DEBUG] 10:43:45.797 shell.go:TemplateCache:774 → environment: [=clink.bin=C:\Program Files (x86)\clink =clink.id=1860 =clink.profile=C:\Users\Niaodan\AppData\Local\clink =clink.scripts= =D:=D:\Code\standard-admin =ExitCode=00000000 ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\Niaodan\AppData\Roaming CLINK_DIR=C:\Program Files (x86)\clink clink_dummy_capture_env=  COLUMNS=222 CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=LAPTOP-LIGHT ComSpec=C:\WINDOWS\system32\cmd.exe DriverData=C:\Windows\System32\Drivers\DriverData HOMEDRIVE=C: HOMEPATH=\Users\Niaodan JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-11.0.20.8-hotspot\ LINES=52 LOCALAPPDATA=C:\Users\Niaodan\AppData\Local LOGONSERVER=\\LAPTOP-LIGHT NUMBER_OF_PROCESSORS=16 OneDrive=C:\Users\Niaodan\OneDrive OneDriveConsumer=C:\Users\Niaodan\OneDrive OS=Windows_NT Path=C:\Program Files\Eclipse Adoptium\jdk-11.0.20.8-hotspot\bin;C:\Program Files\Volta\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;C:\Program Files\Bandizip\;C:\Program Files\Git\cmd;C:\Program Files\MySQL\MySQL Server 8.1\bin;C:\Users\Niaodan\.cargo\bin;C:\Users\Niaodan\AppData\Local\Volta\bin;C:\Users\Niaodan\.windows-build-tools\python27\;C:\Users\Niaodan\AppData\Local\Microsoft\WindowsApps;C:\Softwares\ffmpeg\bin;C:\Users\Niaodan\AppData\Local\Programs\oh-my-posh\bin;C:\Program Files\Git\usr\bin; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC POSH_CURSOR_LINE=19 POSH_INSTALLER=winget POSH_SHELL_VERSION=clink v1.6.11.5e960c POSH_THEME=C:\Users\Niaodan\tools\hotstick.minimal.omp.json POSH_THEMES_PATH=C:\Users\Niaodan\AppData\Local\Programs\oh-my-posh\themes PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 154 Stepping 3, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=9a03 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files 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 SDL_AUDIODRIVER=directsound SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\Niaodan\AppData\Local\Temp TMP=C:\Users\Niaodan\AppData\Local\Temp USERDOMAIN=LAPTOP-LIGHT USERDOMAIN_ROAMINGPROFILE=LAPTOP-LIGHT USERNAME=Niaodan USERPROFILE=C:\Users\Niaodan VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\ windir=C:\WINDOWS WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID={0caa0dad-35be-5f56-a8ff-afceeeaa6101} WT_SESSION=a4e5850c-12db-47b5-8884-c8043f7b74ef ZES_ENABLE_SYSMAN=1]
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 shell.go:Pwd:355 → D:\Code\standard-admin
[TRACE] 10:43:45.797 shell.go:Pwd() - 0s
[DEBUG] 10:43:45.797 shell_windows.go:58 → C:\Users\Niaodan
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 shell.go:User:493 → Niaodan
[TRACE] 10:43:45.797 shell.go:User() - 0s
[DEBUG] 10:43:45.797 shell.go:Host:505 → LAPTOP-LIGHT
[TRACE] 10:43:45.797 shell.go:Host() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 shell.go:Getenv:325 → NO DATA
[TRACE] 10:43:45.797 shell.go:Getenv(SHLVL) - 0s
[TRACE] 10:43:45.797 shell.go:TemplateCache() - 504.7µs
[DEBUG] 10:43:45.797 shell.go:Getenv:325 → 19
[TRACE] 10:43:45.797 shell.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 10:43:45.797 shell.go:Getenv:325 → NO DATA
[TRACE] 10:43:45.797 shell.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 10:43:45.797 shell.go:Flags() - 0s
[TRACE] 10:43:45.797 shell.go:Flags() - 0s
[TRACE] 10:43:45.797 shell.go:Shell() - 0s
[TRACE] 10:43:45.797 shell.go:Shell() - 0s
[TRACE] 10:43:45.797 shell.go:Flags() - 0s
[TRACE] 10:43:45.797 shell.go:Pwd() - 0s
[DEBUG] 10:43:45.797 shell_windows.go:58 → C:\Users\Niaodan
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 segment.go:SetEnabled:529 → Segment: Git
[TRACE] 10:43:45.797 shell.go:Flags() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 shell.go:Getenv:325 → C:\Users\Niaodan\AppData\Local
[TRACE] 10:43:45.797 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 10:43:45.797 shell.go:Pwd() - 0s
[DEBUG] 10:43:45.797 shell_windows.go:58 → C:\Users\Niaodan
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 segment.go:SetEnabled:529 → Segment: Root
[TRACE] 10:43:45.797 shell_windows.go:Root() - 0s
[TRACE] 10:43:45.797 shell.go:Flags() - 0s
[TRACE] 10:43:45.797 shell.go:Pwd() - 0s
[DEBUG] 10:43:45.797 shell_windows.go:58 → C:\Users\Niaodan
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 segment.go:SetEnabled:529 → Segment: Path
[TRACE] 10:43:45.797 shell.go:Pwd() - 0s
[TRACE] 10:43:45.797 shell.go:Shell() - 0s
[TRACE] 10:43:45.797 shell.go:Shell() - 0s
[DEBUG] 10:43:45.797 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 10:43:45.797 properties.go:GetString:28 → 
[DEBUG] 10:43:45.797 properties.go:GetString:28 → 
[DEBUG] 10:43:45.797 shell_windows.go:58 → C:\Users\Niaodan
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[TRACE] 10:43:45.797 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.797 properties.go:GetString:28 → ~
[DEBUG] 10:43:45.798 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:GOOS() - 0s
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[DEBUG] 10:43:45.798 properties.go:GetString:28 → NO DATA
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[DEBUG] 10:43:45.798 properties.go:GetString:28 → full
[DEBUG] 10:43:45.798 properties.go:GetStringArray:52 → cycle: []
[DEBUG] 10:43:45.798 properties.go:GetString:28 → NO DATA
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[DEBUG] 10:43:45.798 properties.go:GetString:28 → \
[DEBUG] 10:43:45.798 properties.go:GetBool:22 → cycle_folder_separator: false
[DEBUG] 10:43:45.798 properties.go:GetString:28 → %s
[DEBUG] 10:43:45.798 properties.go:GetString:28 → %s
[DEBUG] 10:43:45.798 properties.go:GetString:28 → %s
[DEBUG] 10:43:45.798 properties.go:GetString:28 → %s
[TRACE] 10:43:45.798 shell.go:PathSeparator() - 0s
[TRACE] 10:43:45.798 shell.go:Pwd() - 0s
[TRACE] 10:43:45.798 shell_windows.go:IsWsl() - 0s
[TRACE] 10:43:45.798 shell.go:StackCount() - 0s
[DEBUG] 10:43:45.799 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 10:43:45.799 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 10:43:45.799 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 10:43:45.799 shell_windows.go:DirIsWritable() - 504.4µs
[TRACE] 10:43:45.799 shell.go:TemplateCache() - 0s
[DEBUG] 10:43:45.806 shell.go:CommandPath:545 → C:\Program Files\Git\cmd\git.exe
[TRACE] 10:43:45.806 shell.go:CommandPath(git.exe) - 8.7222ms
[TRACE] 10:43:45.806 shell.go:HasCommand(git.exe) - 8.7222ms
[TRACE] 10:43:45.806 shell.go:Pwd() - 0s
[TRACE] 10:43:45.806 shell.go:HasParentFilePath(.git) - 0s
[DEBUG] 10:43:45.806 properties.go:GetStringArray:52 → exclude_folders: []
[DEBUG] 10:43:45.806 shell_windows.go:58 → C:\Users\Niaodan
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.806 properties.go:GetBool:22 → fetch_user: false
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.806 shell.go:Getenv:325 → NO DATA
[TRACE] 10:43:45.806 shell.go:Getenv(POSH_GIT_STATUS) - 0s
[DEBUG] 10:43:45.806 properties.go:GetBool:22 → fetch_status: true
[DEBUG] 10:43:45.806 properties.go:GetStringArray:52 → ignore_status: []
[DEBUG] 10:43:45.806 shell_windows.go:58 → C:\Users\Niaodan
[TRACE] 10:43:45.806 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.806 properties.go:GetKeyValueMap:46 → status_formats: map[]
[DEBUG] 10:43:45.806 properties.go:GetKeyValueMap:46 → untracked_modes: map[]
[DEBUG] 10:43:45.806 properties.go:GetKeyValueMap:46 → ignore_submodules: map[]
[DEBUG] 10:43:45.947 shell.go:RunCommand:523 ↓
    # branch.oid 34dde77f889ebdc25368157ca378d32f8819cf05
    # branch.head standard
    # branch.upstream origin/standard
    # branch.ab +0 -0
[TRACE] 10:43:45.947 shell.go:RunCommand(git.exe -C D:/Code/standard-admin --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2) - 140.926ms
[DEBUG] 10:43:45.947 properties.go:GetString:28 → 
[DEBUG] 10:43:45.947 properties.go:GetInt:40 → branch_max_length: 0
[DEBUG] 10:43:45.947 shell.go:HasFolder:437 → false
[TRACE] 10:43:45.947 shell.go:HasFolder(D:\Code\standard-admin\.git/rebase-merge) - 0s
[DEBUG] 10:43:45.947 shell.go:HasFolder:437 → false
[TRACE] 10:43:45.947 shell.go:HasFolder(D:\Code\standard-admin\.git/rebase-apply) - 0s
[DEBUG] 10:43:45.947 properties.go:GetString:28 → ▷
[DEBUG] 10:43:45.947 shell.go:HasFilesInDir:408 → false
[TRACE] 10:43:45.947 shell.go:HasFilesInDir(MERGE_MSG) - 0s
[DEBUG] 10:43:45.947 shell.go:HasFilesInDir:408 → false
[TRACE] 10:43:45.947 shell.go:HasFilesInDir(CHERRY_PICK_HEAD) - 0s
[DEBUG] 10:43:45.947 shell.go:HasFilesInDir:408 → false
[TRACE] 10:43:45.947 shell.go:HasFilesInDir(REVERT_HEAD) - 0s
[DEBUG] 10:43:45.947 shell.go:HasFilesInDir:408 → false
[TRACE] 10:43:45.947 shell.go:HasFilesInDir(sequencer/todo) - 0s
[DEBUG] 10:43:45.947 properties.go:GetString:28 → ≡
[DEBUG] 10:43:45.947 properties.go:GetBool:22 → fetch_upstream_icon: false
[TRACE] 10:43:45.947 shell.go:TemplateCache() - 0s
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template:  {{ .HEAD }}{{ if or (gt .Ahead 0) (gt .Behind 0) }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template:  {{ .Path }}
[TRACE] 10:43:45.947 shell.go:TemplateCache() - 0s
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[TRACE] 10:43:45.947 shell.go:TemplateCache() - 0s
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template: plain
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template: diamond
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template: {{ if or (.Working.Changed) (.Staging.Changed) }}yellow{{ end }}
[TRACE] 10:43:45.947 shell.go:TemplateCache() - 0s
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template: powerline
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[TRACE] 10:43:45.947 shell.go:Flags() - 0s
[TRACE] 10:43:45.947 shell.go:Flags() - 0s
[TRACE] 10:43:45.947 shell.go:Pwd() - 0s
[TRACE] 10:43:45.947 shell.go:Pwd() - 0s
[DEBUG] 10:43:45.947 shell_windows.go:58 → C:\Users\Niaodan
[DEBUG] 10:43:45.947 shell_windows.go:58 → C:\Users\Niaodan
[TRACE] 10:43:45.947 shell.go:GOOS() - 0s
[DEBUG] 10:43:45.947 segment.go:SetEnabled:529 → Segment: Text
[TRACE] 10:43:45.947 shell.go:GOOS() - 0s
[TRACE] 10:43:45.947 shell.go:TemplateCache() - 0s
[DEBUG] 10:43:45.947 segment.go:SetEnabled:529 → Segment: Text
[TRACE] 10:43:45.947 shell.go:TemplateCache() - 0s
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template: $
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template: ╰─
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[DEBUG] 10:43:45.947 shell.go:Getenv:325 → NO DATA
[TRACE] 10:43:45.947 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template: plain
[DEBUG] 10:43:45.947 text.go:Render:70 → Rendering template: plain
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[TRACE] 10:43:45.947 shell.go:Flags() - 0s
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[TRACE] 10:43:45.947 shell.go:Shell() - 0s
[DEBUG] 10:43:45.947 shell.go:Getenv:325 → C:\Users\Niaodan\AppData\Local
[TRACE] 10:43:45.947 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 10:43:45.947 shell_windows.go:CachePath() - 0s
[TRACE] 10:43:45.947 shell.go:Flags() - 0s
@niaodan2b niaodan2b added the 🐛 bug Something isn't working label Apr 15, 2024
@trwy7
Copy link

trwy7 commented Apr 15, 2024

This happens to me with any segment, but only seems to happen on cmd when the previous render was longer then the current one. It does go away when I press enter, so I think it is clearing the last template after the current one has been rendered.

@JanDeDobbeleer
Copy link
Owner

JanDeDobbeleer commented Apr 16, 2024

We use clink to reload the prompt using their functionality (which should clear it). Is that one up-to-date? @chrisant996 anything you can think about on why this happens?

@niaodan2b
Copy link
Author

I tried downgrading clink to 1.6.9 and the problem disappeared.
Then I upgraded to 1.6.10 and the problem reappeared.

@chrisant996
Copy link
Contributor

It's a regression in v1.6.10 caused by the change to reduce flicker. I opened an issue in the Clink repro to track it.

The flicker reduction change missed that multi-line prompts often don't clear at the ends of lines within the prompt. In the next update, Clink will automatically clear at the ends of lines within a multi-line prompt.

(I could, of course, just go back to having flicker. But the flicker is very annoying and distracting, so I'm intent on eliminating it -- but safely.)

@JanDeDobbeleer
Copy link
Owner

I'm closing this as an external issue, thanks @chrisant996 for being so responsive as always 🙏🏻

@JanDeDobbeleer JanDeDobbeleer added the 🏝 external The issue isn't with oh-my-posh label Apr 18, 2024
@chrisant996
Copy link
Contributor

Clink v1.6.12 is available with the fix.

Copy link

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues.
If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working 🏝 external The issue isn't with oh-my-posh
Projects
None yet
Development

No branches or pull requests

4 participants