JanDeDobbeleer / oh-my-posh

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

Transient Prompt should fully clear output lines if a multiline input was used #3628

Closed JustinGrote closed 1 year ago

JustinGrote commented 1 year ago

Code of Conduct

What happened?

'this
is
multiline'

image Probably should issue an ansi "clear right of cursor" or "clear all below transient prompt" prior to the command output.

Theme

# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json

final_space: true
version: 2

blocks:
  - type: prompt
    alignment: left
    segments:
      - type: session
        style: diamond
        trailing_diamond: 
        background: "#569CD6"
        foreground: "#333333"
        #Windows Terminal Doesn't support wide characters, \uf817 is the only nerd font character here that seems to work.
        template: "{{ if .SSHSession }}\uf817 {{ .UserName }}@{{ .HostName }}{{ end }}"
      - type: path
        style: diamond
        leading_diamond: ""
        trailing_diamond: 
        background: "#333333"
        template: "{{ .Path }}"
        properties:
          home_icon: 🏠
          style: agnoster_short
          max_depth: 2
          mixed_threshold: 2
          folder_icon: 📂
          hide_root_location: false
          mapped_locations_enabled: true
          mapped_locations:
            ~: 🏠
            ~/Projects: 🚧
            ~/Documents: 📄
            ~/.config: "⚙️ "
            ~/.ssh: <gray> </>
            ~/OneDrive: <blue> </>
      - type: git
        style: plain
        background: transparent
        foreground: lightCyan
        template: "{{if ne .Env.TERM_PROGRAM \"vscode\"}} {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uF044 {{ .Working.String }}{{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uF046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0}} \uF692 {{ .StashCount }}{{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }}{{ end }}{{ end }}"
  - type: prompt
    alignment: right
    segments:
      - type: node
        style: diamond
        foreground: "green"
        template: "⬢ {{ .Full }} "
      - type: dotnet
        style: diamond
      - type: python
        style: diamond

      - type: executiontime
        style: diamond
        properties:
          always_enabled: true
          style: amarillo
        foreground: "white"
        background: "#333333"
        template: "<#333333,transparent>\ue0b6</>羽{{ .FormattedMs }}<#333333,transparent></>"
  - type: prompt
    alignment: left
    newline: true
    segments:
      - type: root
        style: plain
        foreground: yellow
        template: ⚡
      - type: exit
        style: plain
        template: ❌
      - type: shell
        template: "{{ .Name }}"
        style: plain
        properties:
          mapped_shell_names:
            pwsh: "" #My default shell
            powershell: <blue> </>
            cmd: <black> </>
            bash: <brown> </>
            zsh: <green> </>
            fish: <cyan> </>
      - type: text
        style: plain
        foreground: green
        template: ❯

valid_line:
  background: transparent
  foreground: "#ffffff"
  template: <green>❯ </>

error_line:
  background: transparent
  foreground: "#ffffff"
  template: <red>❯ </>

secondary_prompt:
  background: transparent
  foreground: "#ffffff"
  template: <cyan>❯ </>

debug_prompt:
  template: "<,yellow>🐞</><yellow></><green>❯ </>"

# This doesn't work as expected currently and overwrites lines incorrectly
transient_prompt:
  background: transparent
  foreground: green
  template: "❯ "

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 14.16.0

Segments:

ConsoleTitle(false)                        -   0 ms - 
session(false)                             -   1 ms - 
path(true)                                 -   1 ms - 🏠\📂\chezmoi
git(false)                                 -   5 ms - 
node(false)                                -   0 ms - 
dotnet(false)                              -   1 ms - 
python(false)                              -   0 ms - 
executiontime(true)                        -   0 ms - 羽0s
root(false)                                -   0 ms - 
exit(false)                                -   0 ms - 
shell(false)                               -   0 ms -
text(true)                                 -   0 ms - ❯

Run duration: 34.9493ms

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

Config path: C:\Users\justi\.config\oh-my-posh\rastan.omp.yaml

Logs:

[DEBUG] 10:59:04.242 shell.go:Getenv:386 → C:\Users\justi\AppData\Local
[TRACE] 10:59:04.242 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 10:59:04.242 shell_windows.go:CachePath() - 0s
[DEBUG] 10:59:04.257 shell.go:Getenv:386 → C:\Users\justi\.config\oh-my-posh\rastan.omp.yaml
[TRACE] 10:59:04.257 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 10:59:04.264 shell.go:Shell:635 → process name: pwsh.exe
[TRACE] 10:59:04.264 shell.go:Shell() - 7.1393ms
[TRACE] 10:59:04.264 shell.go:resolveConfigPath() - 7.1393ms
[TRACE] 10:59:04.264 shell.go:Init() - 22.1138ms
[TRACE] 10:59:04.264 shell.go:Flags() - 0s
[TRACE] 10:59:04.267 config.go:loadConfig() - 3.0633ms
[TRACE] 10:59:04.267 shell.go:Flags() - 0s
[DEBUG] 10:59:04.267 shell.go:Getenv:386 → NO DATA
[TRACE] 10:59:04.267 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 10:59:04.267 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s       
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.267 shell_windows.go:WindowsRegistryKeyValue:206 → ColorizationColor(DWORD): 0xC40078D4
[TRACE] 10:59:04.267 shell.go:Flags() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.267 shell.go:Pwd:414 → NO DATA
[TRACE] 10:59:04.267 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.267 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.267 shell.go:Getenv:386 → NO DATA
[TRACE] 10:59:04.267 shell.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 10:59:04.267 shell.go:Getenv:386 → NO DATA
[TRACE] 10:59:04.267 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 10:59:04.267 shell_windows.go:Root() - 503.9µs
[TRACE] 10:59:04.267 shell.go:Shell() - 0s
[TRACE] 10:59:04.267 shell.go:ErrorCode() - 0s
[TRACE] 10:59:04.267 shell_windows.go:IsWsl() - 0s
[DEBUG] 10:59:04.267 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.267 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.267 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.267 shell.go:User:539 → justi
[TRACE] 10:59:04.267 shell.go:User() - 0s
[DEBUG] 10:59:04.267 shell.go:Host:551 → ADSL-JGrote
[TRACE] 10:59:04.267 shell.go:Host() - 0s
[TRACE] 10:59:04.267 shell.go:GOOS() - 0s
[TRACE] 10:59:04.267 shell.go:TemplateCache() - 503.9µs
[TRACE] 10:59:04.268 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.268 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.268 shell.go:Shell() - 0s
[DEBUG] 10:59:04.268 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.268 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.268 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.268 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.268 shell.go:Pwd() - 0s
[TRACE] 10:59:04.268 shell.go:Shell() - 0s
[TRACE] 10:59:04.268 shell.go:Flags() - 0s
[DEBUG] 10:59:04.268 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.268 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.268 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.268 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.268 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.268 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:GOOS() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[TRACE] 10:59:04.268 shell.go:PathSeparator() - 0s
[DEBUG] 10:59:04.268 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.268 shell.go:Pwd() - 0s
[TRACE] 10:59:04.268 shell_windows.go:IsWsl() - 0s
[TRACE] 10:59:04.268 shell.go:StackCount() - 0s
[DEBUG] 10:59:04.269 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 10:59:04.269 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 10:59:04.269 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 10:59:04.269 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 10:59:04.269 shell_windows.go:DirIsWritable() - 1.061ms
[TRACE] 10:59:04.269 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.269 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.269 shell.go:Shell() - 0s
[DEBUG] 10:59:04.269 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.269 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.269 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.269 shell.go:GOOS() - 0s
[TRACE] 10:59:04.269 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.274 shell.go:CommandPath:590 → C:\Users\justi\scoop\shims\git.exe
[TRACE] 10:59:04.274 shell.go:CommandPath(git.exe) - 4.7164ms
[TRACE] 10:59:04.274 shell.go:HasCommand(git.exe) - 4.7164ms
[DEBUG] 10:59:04.274 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.274 shell.go:Pwd() - 0s
[TRACE] 10:59:04.274 shell.go:HasParentFilePath(.git) - 0s
[DEBUG] 10:59:04.274 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.274 shell.go:Getenv:386 → NO DATA
[TRACE] 10:59:04.274 shell.go:Getenv(POSH_GIT_STATUS) - 0s
[DEBUG] 10:59:04.274 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.274 shell.go:FileContent:507 ↓
    ref: refs/heads/main

[TRACE] 10:59:04.274 shell.go:FileContent(C:\Users\justi\.local\share\chezmoi\.git/HEAD) - 0s
[TRACE] 10:59:04.274 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.274 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.274 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.274 shell.go:Shell() - 0s
[TRACE] 10:59:04.274 shell.go:Flags() - 0s
[DEBUG] 10:59:04.274 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.274 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.274 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.274 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.274 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.274 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.274 shell_windows.go:56 → C:\Users\justi
[DEBUG] 10:59:04.274 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.274 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.274 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.274 shell.go:HasFiles(*.js) - 0s
[DEBUG] 10:59:04.274 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.274 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.274 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.274 shell.go:HasFiles(*.ts) - 0s
[DEBUG] 10:59:04.274 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.274 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.274 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.274 shell.go:HasFiles(package.json) - 0s
[DEBUG] 10:59:04.274 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.274 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(.nvmrc) - 542.1µs
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(pnpm-workspace.yaml) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(.pnpmfile.cjs) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(.npmrc) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(.vue) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.275 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell_windows.go:56 → C:\Users\justi
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(*.cs) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(*.csx) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(*.vb) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(*.sln) - 543.5µs
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(*.slnf) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(*.csproj) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(*.vbproj) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.275 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.275 shell.go:HasFiles(*.fs) - 0s
[DEBUG] 10:59:04.275 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.275 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.276 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.276 shell.go:HasFiles(*.fsx) - 542.6µs
[DEBUG] 10:59:04.276 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.276 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.276 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.276 shell.go:HasFiles(*.fsproj) - 0s
[DEBUG] 10:59:04.276 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.276 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.276 shell.go:HasFiles:435 → false
[TRACE] 10:59:04.276 shell.go:HasFiles(global.json) - 0s
[DEBUG] 10:59:04.276 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.276 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.276 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.276 shell.go:GOOS() - 0s
[DEBUG] 10:59:04.276 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.276 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.276 shell_windows.go:56 → C:\Users\justi
[DEBUG] 10:59:04.276 shell.go:Getenv:386 → NO DATA
[TRACE] 10:59:04.276 shell.go:Getenv(VIRTUAL_ENV) - 0s
[DEBUG] 10:59:04.276 shell.go:Getenv:386 → NO DATA
[TRACE] 10:59:04.276 shell.go:Getenv(CONDA_ENV_PATH) - 0s
[DEBUG] 10:59:04.276 shell.go:Getenv:386 → NO DATA
[TRACE] 10:59:04.276 shell.go:Getenv(CONDA_DEFAULT_ENV) - 0s
[DEBUG] 10:59:04.276 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.276 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.276 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.276 shell.go:GOOS() - 0s
[TRACE] 10:59:04.276 shell.go:ExecutionTime() - 0s
[TRACE] 10:59:04.276 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.276 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.276 shell.go:Shell() - 0s
[TRACE] 10:59:04.276 shell.go:Flags() - 0s
[DEBUG] 10:59:04.276 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.276 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.276 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.276 shell.go:GOOS() - 0s
[TRACE] 10:59:04.276 shell_windows.go:Root() - 0s
[DEBUG] 10:59:04.276 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.276 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.276 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.276 shell.go:GOOS() - 0s
[TRACE] 10:59:04.276 shell.go:ErrorCode() - 0s
[TRACE] 10:59:04.277 shell.go:ErrorCode() - 0s
[DEBUG] 10:59:04.277 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.277 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.277 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.277 shell.go:GOOS() - 0s
[TRACE] 10:59:04.277 shell.go:Shell() - 0s
[TRACE] 10:59:04.277 shell.go:Flags() - 0s
[TRACE] 10:59:04.277 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.277 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.277 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.277 shell.go:Shell() - 0s
[DEBUG] 10:59:04.277 shell.go:Pwd:394 → C:\Users\justi\.local\share\chezmoi
[TRACE] 10:59:04.277 shell.go:Pwd() - 0s
[DEBUG] 10:59:04.277 shell_windows.go:56 → C:\Users\justi
[TRACE] 10:59:04.277 shell.go:GOOS() - 0s
[TRACE] 10:59:04.277 shell.go:TemplateCache() - 0s
[TRACE] 10:59:04.277 shell.go:Shell() - 0s
[DEBUG] 10:59:04.277 shell.go:Getenv:386 → C:\Users\justi\AppData\Local
[TRACE] 10:59:04.277 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 10:59:04.277 shell_windows.go:CachePath() - 504.1µs
[TRACE] 10:59:04.277 shell.go:Flags() - 0s
JanDeDobbeleer commented 1 year ago

@JustinGrote we had that but doing so ruins other tools. We reset the colors so this is a PowerShell bug.

JustinGrote commented 1 year ago

@JanDeDobbeleer do you have an example or a previous issue I missed? Maybe what you mean by "ruins other tools"? Is it possible to emit VT codes directly to the template so I can experiment?

JanDeDobbeleer commented 1 year ago

@JustinGrote wait, I misread the issue. We invoke a prompt reload for transient so there's no magic involved. We even set the prompt line count dynamically, so that's also covered. I seem to remember a similar bug report in the past with no solution available. So definitely something for PSReadLine to look at.

JustinGrote commented 1 year ago

My understanding is you issue all the VT commands to clear the buffer independent of psreadline unless I"m misreading the code, so at this point: image Why can't you issue an ESC[0J (clear everything after the cursor) before objects start being output again?

https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#text-modification image

Or do you think this is something PSReadline should be doing if you're just invoking the prompt again as part of transient?

JanDeDobbeleer commented 1 year ago

Or do you think this is something PSReadline should be doing if you're just invoking the prompt again as part of transient?

@JustinGrote yes, I expect PSReadLine to correctly reload the prompt. I'll do a quick test on my end to see if we could solve this as you can't add that to the prompt easily (we always print something afterwards).

github-actions[bot] commented 11 months ago

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.