JanDeDobbeleer / oh-my-posh

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

Command dissapears when trying to edit command from history #3685

Closed cxMiguelSilva closed 1 year ago

cxMiguelSilva commented 1 year ago

Code of Conduct

What happened?

I use oh my posh on my work laptop that is running Windows 11 with WSL 2 Ubuntu 20.04 and in both environments when using it inside the VsCode when I try to edit the first line of a multiline command it disappears.

Ohmyposh vscode bug

I have been using Oh My Posh on my machine for quite a while and I need to thank you for this amazing tool!

Theme

I believe is the default one

  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "version": 2,
  "final_space": true,
  "console_title_template": "{{ .Shell }} in {{ .Folder }}",
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        {
          "type": "session",
          "style": "diamond",
          "foreground": "p:black",
          "background": "p:yellow",
          "leading_diamond": "\ue0b6",
          "trailing_diamond": "\ue0b0",
          "template": " {{ if .SSHSession }}\uf817 {{ end }}{{ .UserName }} "
        },
        {
          "type": "path",
          "style": "powerline",
          "powerline_symbol": "\ue0b0",
          "foreground": "p:white",
          "background": "p:orange",
          "template": " \uf74a {{ path .Path .Location }} ",
          "properties": {
            "style": "folder"
          }
        },
        {
          "type": "git",
          "style": "powerline",
          "powerline_symbol": "\ue0b0",
          "foreground": "p:black",
          "foreground_templates": [
            "{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}",
            "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}",
            "{{ if gt .Ahead 0 }}p:white{{ end }}"
          ],
          "background": "p:green",
          "background_templates": [
            "{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}",
            "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}",
            "{{ if gt .Ahead 0 }}#49416D{{ end }}",
            "{{ if gt .Behind 0 }}#7A306C{{ end }}"
          ],
          "template": " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
          "properties": {
            "branch_max_length": 25,
            "fetch_status": true,
            "fetch_upstream_icon": true,
            "github_icon": "\uf7a3"
          }
        },
        {
          "type": "root",
          "style": "powerline",
          "powerline_symbol": "\ue0b0",
          "foreground": "p:white",
          "background": "p:yellow",
          "template": " \uf0e7 "
        },
        {
          "type": "exit",
          "style": "diamond",
          "foreground": "p:white",
          "background": "p:blue",
          "background_templates": [
            "{{ if gt .Code 0 }}p:red{{ end }}"
          ],
          "leading_diamond": "<transparent,background>\ue0b0</>",
          "trailing_diamond": "\ue0b4",
          "template": " {{ if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} ",
          "properties": {
            "always_enabled": true
          }
        }
      ]
    },
    {
      "type": "rprompt",
      "segments": [
        {
          "type": "node",
          "style": "plain",
          "foreground": "p:green",
          "background": "transparent",
          "template": "\uf898 ",
          "properties": {
            "display_mode": "files",
            "fetch_package_manager": false,
            "home_enabled": false
          }
        },
        {
          "type": "go",
          "style": "plain",
          "foreground": "p:blue",
          "background": "transparent",
          "template": "\ufcd1 ",
          "properties": {
            "fetch_version": false
          }
        },
        {
          "type": "python",
          "style": "plain",
          "foreground": "p:yellow",
          "background": "transparent",
          "template": "\ue235 ",
          "properties": {
            "display_mode": "files",
            "fetch_version": false,
            "fetch_virtual_env": false
          }
        },
        {
          "type": "shell",
          "style": "plain",
          "foreground": "p:white",
          "background": "transparent",
          "template": "in <p:blue><b>{{ .Name }}</b></> "
        },
        {
          "type": "time",
          "style": "plain",
          "foreground": "p:white",
          "background": "transparent",
          "template": "at <p:blue><b>{{ .CurrentDate | date \"15:04:05\" }}</b></>"
        }
      ]
    }
  ],
  "tooltips": [
    {
      "type": "aws",
      "tips": [
        "aws"
      ],
      "style": "diamond",
      "foreground": "p:white",
      "background": "p:orange",
      "leading_diamond": "\ue0b0",
      "trailing_diamond": "\ue0b4",
      "template": " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} ",
      "properties": {
        "display_default": true
      }
    },
    {
      "type": "az",
      "tips": [
        "az"
      ],
      "style": "diamond",
      "foreground": "p:white",
      "background": "p:blue",
      "leading_diamond": "\ue0b0",
      "trailing_diamond": "\ue0b4",
      "template": " \ufd03 {{ .Name }} ",
      "properties": {
        "display_default": true
      }
    }
  ],
  "transient_prompt": {
    "foreground": "p:black",
    "background": "transparent",
    "template": "<p:yellow,transparent>\ue0b6</><,p:yellow> {{ .Folder }} </><p:yellow,transparent>\ue0b0</> "
  },
  "secondary_prompt": {
    "foreground": "p:black",
    "background": "transparent",
    "template": "<p:yellow,transparent>\ue0b6</><,p:yellow> > </><p:yellow,transparent>\ue0b0</> "
  },
  "palette": {
    "black": "#262B44",
    "blue": "#4B95E9",
    "green": "#59C9A5",
    "orange": "#F07623",
    "red": "#D81E5B",
    "white": "#E0DEF4",
    "yellow": "#F3AE35"
  }
}

What OS are you seeing the problem on?

Linux

Which shell are you using?

bash

Log output

Version: 13.6.0

Segments:

ConsoleTitle(true) -   0 ms - bash in kics
session(true)      -   0 ms -  miguel 
path(true)         -   1 ms -   kics 
git(true)          -  34 ms -   master ≡ 
root(false)        -   0 ms - 
exit(true)         -   0 ms -   
node(false)        -   0 ms - 
go(true)           -   0 ms - ﳑ 
python(false)      -   0 ms - 
shell(true)        -   0 ms - in bash 
time(true)         -   0 ms - at 11:46:27

Run duration: 41.646183ms

Cache path: /home/miguel/.cache/oh-my-posh

Config path: 

Logs:

[DEBUG] 11:46:27.493 shell.go:Getenv:336 → NO DATA
[TRACE] 11:46:27.493 shell.go:Getenv(XDG_CACHE_HOME) - 1.909198ms
[TRACE] 11:46:27.493 shell_unix.go:CachePath() - 2.122966ms
[DEBUG] 11:46:27.495 shell.go:Getenv:336 → NO DATA
[TRACE] 11:46:27.495 shell.go:Getenv(POSH_THEME) - 11.309µs
[TRACE] 11:46:27.495 shell.go:resolveConfigPath() - 16.879µs
[TRACE] 11:46:27.495 shell.go:Init() - 3.288048ms
[TRACE] 11:46:27.495 shell.go:Flags() - 47ns
[TRACE] 11:46:27.495 config.go:loadConfig() - 36.668µs
[TRACE] 11:46:27.495 shell.go:Flags() - 80ns
[DEBUG] 11:46:27.495 shell.go:Getenv:336 → NO DATA
[TRACE] 11:46:27.495 shell.go:Getenv(OMP_CACHE_DISABLED) - 2.511µs
[TRACE] 11:46:27.495 shell_unix.go:Root() - 723ns
[DEBUG] 11:46:27.495 shell.go:Shell:581 → process name: bash
[TRACE] 11:46:27.495 shell.go:Shell() - 391.198µs
[TRACE] 11:46:27.495 shell.go:ErrorCode() - 100ns
[DEBUG] 11:46:27.495 shell.go:Getenv:336 → Ubuntu-20.04
[TRACE] 11:46:27.495 shell.go:Getenv(WSL_DISTRO_NAME) - 2.992µs
[TRACE] 11:46:27.495 shell_unix.go:IsWsl() - 5.394µs
[TRACE] 11:46:27.495 shell.go:GOOS() - 94ns
[DEBUG] 11:46:27.495 shell.go:Pwd:364 → NO DATA
[TRACE] 11:46:27.495 shell.go:Pwd() - 28.689µs
[TRACE] 11:46:27.495 shell.go:GOOS() - 45ns
[TRACE] 11:46:27.495 shell.go:GOOS() - 20ns
[TRACE] 11:46:27.495 shell.go:GOOS() - 20ns
[TRACE] 11:46:27.495 shell.go:GOOS() - 20ns
[TRACE] 11:46:27.495 shell.go:GOOS() - 27ns
[TRACE] 11:46:27.495 shell.go:GOOS() - 21ns
[DEBUG] 11:46:27.495 shell.go:User:485 → miguel
[TRACE] 11:46:27.495 shell.go:User() - 5.564µs
[DEBUG] 11:46:27.495 shell.go:Host:497 → MiguelD-LT
[TRACE] 11:46:27.495 shell.go:Host() - 5.924µs
[TRACE] 11:46:27.495 shell.go:GOOS() - 23ns
[TRACE] 11:46:27.495 shell.go:TemplateCache() - 502.383µs
[TRACE] 11:46:27.495 shell.go:Flags() - 56ns
[DEBUG] 11:46:27.495 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.495 shell.go:Pwd() - 9.911µs
[TRACE] 11:46:27.495 shell.go:GOOS() - 21ns
[DEBUG] 11:46:27.495 shell.go:Getenv:336 → NO DATA
[TRACE] 11:46:27.495 shell.go:Getenv(SSH_CONNECTION) - 1.798µs
[DEBUG] 11:46:27.495 shell.go:Getenv:336 → NO DATA
[TRACE] 11:46:27.495 shell.go:Getenv(SSH_CLIENT) - 1.658µs
[TRACE] 11:46:27.495 shell.go:TemplateCache() - 183ns
[TRACE] 11:46:27.496 shell.go:TemplateCache() - 160ns
[TRACE] 11:46:27.496 shell.go:Shell() - 83ns
[DEBUG] 11:46:27.496 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.496 shell.go:Pwd() - 7.533µs
[TRACE] 11:46:27.496 shell.go:GOOS() - 63ns
[DEBUG] 11:46:27.496 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.496 shell.go:Pwd() - 2.105µs
[TRACE] 11:46:27.496 shell.go:Shell() - 71ns
[TRACE] 11:46:27.496 shell.go:Shell() - 40ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 40ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 38ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 40ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 62ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 59ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 26ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 21ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 31ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 23ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 21ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 23ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 20ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 24ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 21ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 25ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 23ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 22ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 25ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 26ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 24ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 24ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 35ns
[TRACE] 11:46:27.496 shell.go:GOOS() - 23ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 24ns
[TRACE] 11:46:27.496 shell.go:PathSeparator() - 22ns
[DEBUG] 11:46:27.496 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.496 shell.go:Pwd() - 1.997µs
[DEBUG] 11:46:27.496 shell.go:Getenv:336 → Ubuntu-20.04
[TRACE] 11:46:27.496 shell.go:Getenv(WSL_DISTRO_NAME) - 2.16µs
[TRACE] 11:46:27.496 shell_unix.go:IsWsl() - 5.096µs
[DEBUG] 11:46:27.497 shell.go:RunCommand:515 → //wsl.localhost/Ubuntu-20.04/home/miguel/cx/kics
[TRACE] 11:46:27.497 shell.go:RunCommand(wslpath -m /home/miguel/cx/kics) - 907.636µs
[TRACE] 11:46:27.497 shell.go:StackCount() - 126ns
[TRACE] 11:46:27.497 shell_unix.go:DirIsWritable(/home/miguel/cx/kics) - 18.4µs
[TRACE] 11:46:27.497 shell.go:TemplateCache() - 119ns
[TRACE] 11:46:27.497 shell.go:TemplateCache() - 159ns
[TRACE] 11:46:27.497 shell.go:Shell() - 79ns
[DEBUG] 11:46:27.497 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.497 shell.go:Pwd() - 3.316µs
[TRACE] 11:46:27.497 shell.go:GOOS() - 62ns
[DEBUG] 11:46:27.497 shell.go:Getenv:336 → Ubuntu-20.04
[TRACE] 11:46:27.497 shell.go:Getenv(WSL_DISTRO_NAME) - 2.149µs
[TRACE] 11:46:27.497 shell_unix.go:IsWsl() - 4.195µs
[DEBUG] 11:46:27.497 shell.go:FileContent:453 ↓
    5.15.90.1-microsoft-standard-WSL2

[TRACE] 11:46:27.497 shell.go:FileContent(/proc/sys/kernel/osrelease) - 149.303µs
[TRACE] 11:46:27.497 shell_unix.go:IsWsl2() - 159.365µs
[DEBUG] 11:46:27.497 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.497 shell.go:Pwd() - 3.182µs
[DEBUG] 11:46:27.498 shell.go:RunCommand:515 → //wsl.localhost/Ubuntu-20.04/home/miguel/cx/kics
[TRACE] 11:46:27.498 shell.go:RunCommand(wslpath -m /home/miguel/cx/kics) - 570.054µs
[TRACE] 11:46:27.498 shell.go:GOOS() - 49ns
[DEBUG] 11:46:27.498 shell.go:CommandPath:536 → /usr/bin/git
[TRACE] 11:46:27.498 shell.go:CommandPath(git) - 21.577µs
[TRACE] 11:46:27.498 shell.go:HasCommand(git) - 29.094µs
[DEBUG] 11:46:27.498 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.498 shell.go:Pwd() - 2.452µs
[TRACE] 11:46:27.498 shell.go:HasParentFilePath(.git) - 13.349µs
[TRACE] 11:46:27.498 shell.go:GOOS() - 31ns
[TRACE] 11:46:27.498 shell.go:GOOS() - 25ns
[TRACE] 11:46:27.498 shell.go:GOOS() - 30ns
[TRACE] 11:46:27.498 shell.go:GOOS() - 26ns
[TRACE] 11:46:27.498 shell.go:GOOS() - 26ns
[TRACE] 11:46:27.498 shell.go:GOOS() - 31ns
[TRACE] 11:46:27.498 shell.go:GOOS() - 31ns
[DEBUG] 11:46:27.498 shell.go:Getenv:336 → NO DATA
[TRACE] 11:46:27.498 shell.go:Getenv(POSH_GIT_STATUS) - 3.096µs
[DEBUG] 11:46:27.529 shell.go:RunCommand:515 ↓
    # branch.oid 2b0b4294b923b9bd64f1f5a479abf02fa8bc7c07
    # branch.head master
    # branch.upstream origin/master
    # branch.ab +0 -0
[TRACE] 11:46:27.529 shell.go:RunCommand(git -C /home/miguel/cx/kics --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2) - 30.644131ms
[DEBUG] 11:46:27.529 shell.go:HasFolder:424 → false
[TRACE] 11:46:27.529 shell.go:HasFolder(/home/miguel/cx/kics/.git/rebase-merge) - 7.188µs
[DEBUG] 11:46:27.529 shell.go:HasFolder:424 → false
[TRACE] 11:46:27.529 shell.go:HasFolder(/home/miguel/cx/kics/.git/rebase-apply) - 2.395µs
[DEBUG] 11:46:27.529 shell.go:HasFilesInDir:395 → false
[TRACE] 11:46:27.529 shell.go:HasFilesInDir(MERGE_MSG) - 11.456µs
[DEBUG] 11:46:27.529 shell.go:HasFilesInDir:395 → false
[TRACE] 11:46:27.529 shell.go:HasFilesInDir(CHERRY_PICK_HEAD) - 3.496µs
[DEBUG] 11:46:27.529 shell.go:HasFilesInDir:395 → false
[TRACE] 11:46:27.529 shell.go:HasFilesInDir(REVERT_HEAD) - 2.8µs
[DEBUG] 11:46:27.529 shell.go:HasFilesInDir:395 → false
[TRACE] 11:46:27.529 shell.go:HasFilesInDir(sequencer/todo) - 2.853µs
[TRACE] 11:46:27.530 shell.go:TemplateCache() - 384ns
[TRACE] 11:46:27.531 shell.go:TemplateCache() - 246ns
[TRACE] 11:46:27.531 shell.go:Shell() - 173ns
[TRACE] 11:46:27.531 shell.go:TemplateCache() - 166ns
[TRACE] 11:46:27.531 shell.go:TemplateCache() - 112ns
[TRACE] 11:46:27.531 shell.go:TemplateCache() - 161ns
[TRACE] 11:46:27.531 shell.go:TemplateCache() - 159ns
[TRACE] 11:46:27.531 shell.go:TemplateCache() - 148ns
[TRACE] 11:46:27.532 shell.go:TemplateCache() - 170ns
[TRACE] 11:46:27.532 shell.go:TemplateCache() - 152ns
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 3.808µs
[TRACE] 11:46:27.532 shell.go:GOOS() - 57ns
[TRACE] 11:46:27.532 shell_unix.go:Root() - 335ns
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 2.236µs
[TRACE] 11:46:27.532 shell.go:GOOS() - 20ns
[TRACE] 11:46:27.532 shell.go:ErrorCode() - 58ns
[TRACE] 11:46:27.532 shell.go:TemplateCache() - 43ns
[TRACE] 11:46:27.532 shell.go:TemplateCache() - 160ns
[TRACE] 11:46:27.532 shell.go:Shell() - 77ns
[TRACE] 11:46:27.532 shell.go:TemplateCache() - 150ns
[TRACE] 11:46:27.532 shell.go:Flags() - 62ns
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 2.751µs
[TRACE] 11:46:27.532 shell.go:GOOS() - 60ns
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.977µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.878µs
[TRACE] 11:46:27.532 shell.go:HasFiles(*.js) - 49.638µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 2.211µs
[TRACE] 11:46:27.532 shell.go:HasFiles(*.ts) - 26.451µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.87µs
[TRACE] 11:46:27.532 shell.go:HasFiles(package.json) - 5.984µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.771µs
[TRACE] 11:46:27.532 shell.go:HasFiles(.nvmrc) - 4.631µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 2.01µs
[TRACE] 11:46:27.532 shell.go:HasFiles(pnpm-workspace.yaml) - 4.84µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.814µs
[TRACE] 11:46:27.532 shell.go:HasFiles(.pnpmfile.cjs) - 4.532µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 6.787µs
[TRACE] 11:46:27.532 shell.go:HasFiles(.npmrc) - 9.422µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.828µs
[TRACE] 11:46:27.532 shell.go:HasFiles(.vue) - 8.276µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 2.404µs
[TRACE] 11:46:27.532 shell.go:GOOS() - 24ns
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.832µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.77µs
[TRACE] 11:46:27.532 shell.go:HasFiles(*.go) - 24.508µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.698µs
[TRACE] 11:46:27.532 shell.go:HasFiles(go.mod) - 6.081µs
[TRACE] 11:46:27.532 shell.go:TemplateCache() - 93ns
[TRACE] 11:46:27.532 shell.go:Shell() - 59ns
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.978µs
[TRACE] 11:46:27.532 shell.go:GOOS() - 37ns
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.858µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.828µs
[TRACE] 11:46:27.532 shell.go:HasFiles(*.py) - 24.042µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.824µs
[TRACE] 11:46:27.532 shell.go:HasFiles(*.ipynb) - 25.452µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.643µs
[TRACE] 11:46:27.532 shell.go:HasFiles(pyproject.toml) - 4.644µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.744µs
[TRACE] 11:46:27.532 shell.go:HasFiles(venv.bak) - 4.438µs
[DEBUG] 11:46:27.532 shell.go:HasFolder:424 → false
[TRACE] 11:46:27.532 shell.go:HasFolder(.venv) - 2.743µs
[DEBUG] 11:46:27.532 shell.go:HasFolder:424 → false
[TRACE] 11:46:27.532 shell.go:HasFolder(venv) - 2.453µs
[DEBUG] 11:46:27.532 shell.go:HasFolder:424 → false
[TRACE] 11:46:27.532 shell.go:HasFolder(virtualenv) - 2.257µs
[DEBUG] 11:46:27.532 shell.go:HasFolder:424 → false
[TRACE] 11:46:27.532 shell.go:HasFolder(env) - 2.039µs
[DEBUG] 11:46:27.532 shell.go:HasFolder:424 → false
[TRACE] 11:46:27.532 shell.go:HasFolder(venv-win) - 2.045µs
[DEBUG] 11:46:27.532 shell.go:HasFolder:424 → false
[TRACE] 11:46:27.532 shell.go:HasFolder(pyenv-win) - 2.027µs
[DEBUG] 11:46:27.532 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.532 shell.go:Pwd() - 1.902µs
[TRACE] 11:46:27.532 shell.go:GOOS() - 21ns
[TRACE] 11:46:27.532 shell.go:Shell() - 28ns
[TRACE] 11:46:27.532 shell.go:Flags() - 49ns
[TRACE] 11:46:27.533 shell.go:TemplateCache() - 48ns
[TRACE] 11:46:27.533 shell.go:TemplateCache() - 146ns
[TRACE] 11:46:27.533 shell.go:Shell() - 64ns
[DEBUG] 11:46:27.533 shell.go:Pwd:344 → /home/miguel/cx/kics
[TRACE] 11:46:27.533 shell.go:Pwd() - 3.108µs
[TRACE] 11:46:27.533 shell.go:GOOS() - 41ns
[TRACE] 11:46:27.533 shell.go:TemplateCache() - 92ns
[TRACE] 11:46:27.533 shell.go:TemplateCache() - 159ns
[TRACE] 11:46:27.533 shell.go:Shell() - 83ns
[DEBUG] 11:46:27.533 shell.go:Getenv:336 → NO DATA
[TRACE] 11:46:27.533 shell.go:Getenv(XDG_CACHE_HOME) - 3.657µs
[TRACE] 11:46:27.533 shell_unix.go:CachePath() - 11.062µs
[TRACE] 11:46:27.533 shell.go:Flags() - 91ns
JanDeDobbeleer commented 1 year ago

@cxMiguelSilva I can't reproduce this in plain bash in iTerm2 on macOS (same logic). Can you validate it's not caused by vscode's shell integrations?

JanDeDobbeleer commented 1 year ago

@cxMiguelSilva any update on this after my question?

cxMiguelSilva commented 1 year ago

Hi @JanDeDobbeleer, I set the terminal.integrated.shellIntegration.enabled to false and it still occurs.

JanDeDobbeleer commented 1 year ago

@cxMiguelSilva I can't reproduce this at all, tried again and again, it never really happens. Can you try upgrading to the latest oh-my-posh AND upgrade bash and see if the issue persists?

kvnsys commented 1 year ago

I have the same issue.... please if you solved it, could you tell me how?

cxMiguelSilva commented 1 year ago

I wasn't able to solve it, but from I have personally tested it does not occur in wsl with ubuntu 22.04. This is one of the main reasons for me to migrate from 20.04 in the near future.

kvnsys commented 1 year ago

Hi @JanDeDobbeleer, I set the terminal.integrated.shellIntegration.enabled to false and it still occurs.

I could solve it on Pop OS! Actually... that solution worked for me.

For future reference, this is me:

NAME="Pop!_OS" VERSION="22.04 LTS" ID=pop ID_LIKE="ubuntu debian" PRETTY_NAME="Pop!_OS 22.04 LTS" VERSION_ID="22.04"

Thanks!

AHarmlessPyro commented 11 months ago

I have a similar issue. Running this on Mac, and the terminal.integrated.shellIntegration.enabled=false doesn't seem to fix.

Issue persists on all of vscode, iTerm2, and Terminal.

I had a slight variation of this issue. When I recall from history and there is some sort of line wrap, then the text on the first line vanishes on editing (or fast scrolling using option+arrow). Also, it seems that part of the issue is that the new characters that come in place are ascii code 32 (aka space), but only on all the characters from the first line. The characters from the second line persist visually.

Of note, only the display seems to be disrupted. It seems that the internal structure is still intact. Here's a video showing the same. https://asciinema.org/a/lxrVqFU5B3tvbHOGhQGKkqU5S

The characters vanish on editing, but the ffmpeg command still gets executed, so whatever internal structure is modified is persisted.

JanDeDobbeleer commented 11 months ago

@AHarmlessPyro see the same topic in discussions. I have a theoretical build that could solve this (but breaks other things).

AHarmlessPyro commented 11 months ago

Awesome. I'll try the new builds out. For anyone else interested, I think the discussion mentioned above is this one: https://github.com/JanDeDobbeleer/oh-my-posh/discussions/4508

JanDeDobbeleer commented 11 months ago

@AHarmlessPyro correct, it's in this message.

github-actions[bot] commented 5 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.