JanDeDobbeleer / oh-my-posh

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

Weird escape characters on the VSCode integrated Terminal #4897

Closed Eric-Philippe closed 5 months ago

Eric-Philippe commented 5 months ago

Code of Conduct

What happened?

image I've this on my VScode Terminal suddenly And it looks like it's only on the VSC terminal Either on a proper shell (WSL) and powershell, everything works as usual The MesloLGM NerdFont is well installed and setup on VSCode

Theme

the native one

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Segments:

ConsoleTitle(true)                        -   0 ms
Session(true)                             -   3 ms
Path(true)                                -   3 ms
Git(false)                                -   2 ms
Root(false)                               -   0 ms
Status(true)                              -   0 ms
Node(false)                               -   0 ms
Go(false)                                 -   0 ms
Python(false)                             -   0 ms
Shell(true)                               -   0 ms
Time(true)                                -   0 ms

Run duration: 12.857353ms

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

Config path: no --config set, using default built-in configuration

Logs:

[DEBUG] 16:03:39.845 shell.go:Getenv:399 → vscode
[TRACE] 16:03:39.845 shell.go:Getenv(TERM_PROGRAM) - 2.369296ms
[DEBUG] 16:03:39.845 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.845 shell.go:Getenv(OMP_CACHE_DIR) - 5.622µs
[DEBUG] 16:03:39.845 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.845 shell.go:Getenv(XDG_CACHE_HOME) - 2.844µs
[TRACE] 16:03:39.845 shell_unix.go:CachePath() - 28.986µs
[DEBUG] 16:03:39.845 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.845 shell.go:Getenv(POSH_THEME) - 3.037µs
[DEBUG] 16:03:39.845 shell.go:resolveConfigPath:319 → No config set, fallback to default config
[TRACE] 16:03:39.845 shell.go:resolveConfigPath() - 13.868µs
[TRACE] 16:03:39.845 shell.go:Init() - 2.689192ms
[TRACE] 16:03:39.845 shell.go:Flags() - 53ns
[DEBUG] 16:03:39.845 config.go:loadConfig:129 → no config file specified, using default
[TRACE] 16:03:39.845 config.go:loadConfig() - 14.349µs
[TRACE] 16:03:39.845 shell.go:Flags() - 32ns
[DEBUG] 16:03:39.845 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.845 shell.go:Getenv(OMP_CACHE_DISABLED) - 2.333µs
[DEBUG] 16:03:39.845 shell.go:Shell:662 → no shell name provided in flags, trying to detect it
[DEBUG] 16:03:39.846 shell.go:Shell:670 → process name: bash
[TRACE] 16:03:39.846 shell.go:Shell() - 480.527µs
[DEBUG] 16:03:39.846 shell.go:Getenv:399 → 5.1.16(1)-release
[TRACE] 16:03:39.846 shell.go:Getenv(POSH_SHELL_VERSION) - 2.911µs
[DEBUG] 16:03:39.846 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 16:03:39.846 text.go:Render:70 → Rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 16:03:39.846 shell_unix.go:Root() - 404ns
[TRACE] 16:03:39.846 shell.go:Shell() - 94ns
[TRACE] 16:03:39.846 shell.go:StatusCodes() - 68ns
[DEBUG] 16:03:39.846 shell_unix.go:IsWsl:35 → true
[TRACE] 16:03:39.846 shell_unix.go:IsWsl() - 3.842µs
[DEBUG] 16:03:39.846 shell.go:TemplateCache:843 → environment: [SHELL=/bin/bash COLORTERM=truecolor WSL2_GUI_APPS_ENABLED=1 TERM_PROGRAM_VERSION=1.90.0-insider POSH_PID=3150 WSL_DISTRO_NAME=Ubuntu NAME=GalaxyLaptop-Eric PWD=/home/ericp LOGNAME=ericp VSCODE_GIT_ASKPASS_NODE=/home/ericp/.vscode-server-insiders/bin/a1f2ea3162c704a5890c35dde4df6ee46283d957/node MOTD_SHOWN=update-motd HOME=/home/ericp LANG=C.UTF-8 WSL_INTEROP=/run/WSL/815_interop LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: POSH_SHELL_VERSION=5.1.16(1)-release WAYLAND_DISPLAY=wayland-0 CONDA_PROMPT_MODIFIER=false GIT_ASKPASS=/home/ericp/.vscode-server-insiders/bin/a1f2ea3162c704a5890c35dde4df6ee46283d957/extensions/git/dist/askpass.sh VSCODE_GIT_ASKPASS_EXTRA_ARGS= LESSCLOSE=/usr/bin/lesspipe %s %s TERM=xterm-256color LESSOPEN=| /usr/bin/lesspipe %s USER=ericp VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-6825a91810.sock DISPLAY=:0 SHLVL=1 POSH_THEME= XDG_RUNTIME_DIR=/run/user/1000/ WSLENV=VSCODE_WSL_EXT_LOCATION/up:VSCODE_SERVER_TAR/up VSCODE_GIT_ASKPASS_MAIN=/home/ericp/.vscode-server-insiders/bin/a1f2ea3162c704a5890c35dde4df6ee46283d957/extensions/git/dist/askpass-main.js XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop PATH=/home/ericp/.vscode-server-insiders/bin/a1f2ea3162c704a5890c35dde4df6ee46283d957/bin/remote-cli:/home/ericp/.local/bin:/home/ericp/.juliaup/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files (x86)/oh-my-posh/bin:/mnt/c/Users/ericp/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/JetBrains/IntelliJ IDEA 2023.3.2/bin:/mnt/c/Program Files/JetBrains/DataGrip 2023.3.2/bin:/mnt/c/Users/ericp/AppData/Local/Programs/Microsoft VS Code Insiders/bin:/mnt/c/Users/ericp/AppData/Local/Programs/oh-my-posh/bin:/mnt/c/tools/dart-sdk/bin:/mnt/c/Users/ericp/AppData/Local/Pub/Cache/bin:/mnt/c/Users/ericp/AppData/Roaming/npm:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus HOSTTYPE=x86_64 POWERLINE_COMMAND=oh-my-posh PULSE_SERVER=unix:/mnt/wslg/PulseServer TERM_PROGRAM=vscode VSCODE_IPC_HOOK_CLI=/run/user/1000/vscode-ipc-a0723f96-13a0-4e1d-9649-75e3504fa4a9.sock _=/usr/local/bin/oh-my-posh]
[TRACE] 16:03:39.846 shell.go:GOOS() - 102ns
[DEBUG] 16:03:39.846 shell.go:Pwd:429 → /home/ericp
[TRACE] 16:03:39.846 shell.go:Pwd() - 10.047µs
[TRACE] 16:03:39.846 shell.go:GOOS() - 72ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 42ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 29ns
[DEBUG] 16:03:39.846 shell.go:User:564 → ericp
[TRACE] 16:03:39.846 shell.go:User() - 2.787µs
[DEBUG] 16:03:39.846 shell.go:Host:576 → GalaxyLaptop-Eric
[TRACE] 16:03:39.846 shell.go:Host() - 4.107µs
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[DEBUG] 16:03:39.846 shell_unix.go:Platform:77 → ubuntu
[DEBUG] 16:03:39.846 shell.go:Getenv:399 → 1
[TRACE] 16:03:39.846 shell.go:Getenv(SHLVL) - 2.296µs
[TRACE] 16:03:39.846 shell.go:TemplateCache() - 102.392µs
[DEBUG] 16:03:39.846 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.846 shell.go:Getenv(POSH_CURSOR_LINE) - 3.338µs
[DEBUG] 16:03:39.846 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.846 shell.go:Getenv(POSH_CURSOR_COLUMN) - 1.82µs
[TRACE] 16:03:39.846 shell.go:Flags() - 80ns
[TRACE] 16:03:39.846 shell.go:Flags() - 33ns
[TRACE] 16:03:39.846 shell.go:Shell() - 52ns
[TRACE] 16:03:39.846 shell.go:Shell() - 32ns
[TRACE] 16:03:39.846 shell.go:Flags() - 105ns
[DEBUG] 16:03:39.846 properties.go:GetString:28 → {{ .Code }}
[TRACE] 16:03:39.846 shell.go:Flags() - 498ns
[TRACE] 16:03:39.846 shell.go:Pwd() - 223ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 60ns
[DEBUG] 16:03:39.846 segment.go:SetEnabled:512 → Segment: Status
[TRACE] 16:03:39.846 shell.go:StatusCodes() - 71ns
[DEBUG] 16:03:39.846 text.go:Render:70 → Rendering template: {{ .Code }}
[TRACE] 16:03:39.846 shell.go:Pwd() - 209ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 99ns
[DEBUG] 16:03:39.846 segment.go:SetEnabled:512 → Segment: Path
[TRACE] 16:03:39.846 shell.go:Pwd() - 67ns
[TRACE] 16:03:39.846 shell.go:Shell() - 168ns
[TRACE] 16:03:39.846 shell.go:Shell() - 50ns
[DEBUG] 16:03:39.846 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 16:03:39.846 properties.go:GetString:28 → 
[DEBUG] 16:03:39.846 properties.go:GetString:28 → 
[TRACE] 16:03:39.846 shell.go:GOOS() - 51ns
[DEBUG] 16:03:39.846 properties.go:GetString:28 → ~
[DEBUG] 16:03:39.846 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 16:03:39.846 shell.go:PathSeparator() - 78ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 61ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 31ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 119ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:PathSeparator() - 79ns
[TRACE] 16:03:39.846 shell.go:PathSeparator() - 64ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 55ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 31ns
[TRACE] 16:03:39.846 shell.go:PathSeparator() - 29ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:PathSeparator() - 30ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:GOOS() - 30ns
[TRACE] 16:03:39.846 shell.go:PathSeparator() - 31ns
[TRACE] 16:03:39.846 shell.go:Pwd() - 89ns
[DEBUG] 16:03:39.846 shell_unix.go:IsWsl:35 → true
[TRACE] 16:03:39.846 shell_unix.go:IsWsl() - 3.508µs
[TRACE] 16:03:39.846 shell.go:TemplateCache() - 272ns
[DEBUG] 16:03:39.846 properties.go:GetBool:22 → always_enabled: true
[TRACE] 16:03:39.846 shell.go:TemplateCache() - 80ns
[TRACE] 16:03:39.847 shell.go:Flags() - 452ns
[TRACE] 16:03:39.846 shell.go:Flags() - 60ns
[TRACE] 16:03:39.847 shell.go:Pwd() - 439ns
[TRACE] 16:03:39.847 shell.go:GOOS() - 74ns
[DEBUG] 16:03:39.847 segment.go:SetEnabled:512 → Segment: Git
[DEBUG] 16:03:39.847 shell_unix.go:IsWsl:35 → true
[TRACE] 16:03:39.847 shell_unix.go:IsWsl() - 4.502µs
[TRACE] 16:03:39.847 shell.go:Pwd() - 503ns
[TRACE] 16:03:39.847 shell.go:GOOS() - 178ns
[DEBUG] 16:03:39.847 segment.go:SetEnabled:512 → Segment: Root
[TRACE] 16:03:39.847 shell_unix.go:Root() - 1.4µs
[TRACE] 16:03:39.847 shell.go:Flags() - 413ns
[DEBUG] 16:03:39.847 shell.go:FileContent:538 ↓
    5.15.146.1-microsoft-standard-WSL2

[TRACE] 16:03:39.847 shell.go:FileContent(/proc/sys/kernel/osrelease) - 40.482µs
[TRACE] 16:03:39.847 shell_unix.go:IsWsl2() - 53.275µs
[TRACE] 16:03:39.847 shell.go:Pwd() - 90ns
[TRACE] 16:03:39.847 shell.go:Pwd() - 235ns
[TRACE] 16:03:39.847 shell.go:GOOS() - 82ns
[DEBUG] 16:03:39.847 segment.go:SetEnabled:512 → Segment: Session
[DEBUG] 16:03:39.847 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.847 shell.go:Getenv(SSH_CONNECTION) - 4.699µs
[DEBUG] 16:03:39.847 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.847 shell.go:Getenv(SSH_CLIENT) - 2.677µs
[DEBUG] 16:03:39.847 shell_unix.go:Platform:77 → ubuntu
[DEBUG] 16:03:39.849 shell.go:RunCommand:594 → //wsl.localhost/Ubuntu/home/ericp
[TRACE] 16:03:39.849 shell.go:RunCommand(wslpath -m /home/ericp) - 2.937737ms
[TRACE] 16:03:39.849 shell.go:StackCount() - 180ns
[TRACE] 16:03:39.849 shell_unix.go:DirIsWritable(/home/ericp) - 7.348µs
[TRACE] 16:03:39.849 shell.go:TemplateCache() - 355ns
[DEBUG] 16:03:39.849 shell.go:RunCommand:594 → //wsl.localhost/Ubuntu/home/ericp
[TRACE] 16:03:39.850 shell.go:RunCommand(wslpath -m /home/ericp) - 2.265151ms
[TRACE] 16:03:39.850 shell.go:GOOS() - 86ns
[DEBUG] 16:03:39.850 shell.go:CommandPath:615 → /usr/bin/git
[TRACE] 16:03:39.850 shell.go:CommandPath(git) - 31.248µs
[TRACE] 16:03:39.850 shell.go:HasCommand(git) - 35.178µs
[TRACE] 16:03:39.850 shell.go:Pwd() - 139ns
[ERROR] 16:03:39.850 shell.go:HasParentFilePath:758 → stat .git: no such file or directory
[TRACE] 16:03:39.850 shell.go:HasParentFilePath(.git) - 25.027µs
[DEBUG] 16:03:39.850 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 16:03:39.850 shell.go:RunCommand:594 → NO DATA
[TRACE] 16:03:39.850 shell.go:RunCommand(who am i) - 2.922445ms
[TRACE] 16:03:39.850 shell.go:TemplateCache() - 454ns
[DEBUG] 16:03:39.851 text.go:Render:70 → Rendering template:  {{ if gt .Code 0 }}{{ else }}{{ end }} 
[DEBUG] 16:03:39.851 text.go:Render:70 → Rendering template:  {{ if .SSHSession }} {{ end }}{{ .UserName }} 
[DEBUG] 16:03:39.851 text.go:Render:70 → Rendering template:   {{ path .Path .Location }} 
[TRACE] 16:03:39.851 shell.go:TemplateCache() - 553ns
[TRACE] 16:03:39.851 shell.go:Shell() - 155ns
[TRACE] 16:03:39.851 shell.go:TemplateCache() - 662ns
[TRACE] 16:03:39.851 shell.go:Shell() - 201ns
[TRACE] 16:03:39.851 shell.go:TemplateCache() - 296ns
[TRACE] 16:03:39.851 shell.go:Shell() - 162ns
[DEBUG] 16:03:39.851 text.go:Render:70 → Rendering template: diamond
[DEBUG] 16:03:39.851 text.go:Render:70 → Rendering template: powerline
[DEBUG] 16:03:39.851 text.go:Render:70 → Rendering template: powerline
[DEBUG] 16:03:39.851 text.go:Render:70 → Rendering template: powerline
[DEBUG] 16:03:39.851 text.go:Render:70 → Rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 16:03:39.852 shell.go:TemplateCache() - 362ns
[DEBUG] 16:03:39.852 text.go:Render:70 → Rendering template: diamond
[TRACE] 16:03:39.852 shell.go:Shell() - 138ns
[TRACE] 16:03:39.852 shell.go:Shell() - 50ns
[TRACE] 16:03:39.852 shell.go:Shell() - 54ns
[TRACE] 16:03:39.852 shell.go:Shell() - 45ns
[DEBUG] 16:03:39.852 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.852 shell.go:Getenv(OMP_CACHE_DISABLED) - 4.718µs
[TRACE] 16:03:39.852 shell.go:Flags() - 86ns
[TRACE] 16:03:39.852 shell.go:Flags() - 127ns
[TRACE] 16:03:39.852 shell.go:Pwd() - 168ns
[TRACE] 16:03:39.852 shell.go:GOOS() - 90ns
[DEBUG] 16:03:39.852 segment.go:SetEnabled:512 → Segment: Time
[DEBUG] 16:03:39.852 properties.go:GetString:28 → 15:04:05
[TRACE] 16:03:39.852 shell.go:Flags() - 383ns
[TRACE] 16:03:39.852 shell.go:TemplateCache() - 121ns
[TRACE] 16:03:39.852 shell.go:Pwd() - 177ns
[TRACE] 16:03:39.852 shell.go:Flags() - 52ns
[TRACE] 16:03:39.852 shell.go:GOOS() - 108ns
[TRACE] 16:03:39.852 shell.go:Flags() - 199ns
[DEBUG] 16:03:39.852 segment.go:SetEnabled:512 → Segment: Go
[DEBUG] 16:03:39.852 properties.go:GetString:28 → files
[TRACE] 16:03:39.852 shell.go:Pwd() - 157ns
[TRACE] 16:03:39.852 shell.go:GOOS() - 74ns
[DEBUG] 16:03:39.852 properties.go:GetStringArray:52 → extensions: [*.go go.mod]
[TRACE] 16:03:39.852 shell.go:Pwd() - 173ns
[TRACE] 16:03:39.852 shell.go:GOOS() - 84ns
[DEBUG] 16:03:39.852 properties.go:GetBool:22 → home_enabled: false
[DEBUG] 16:03:39.852 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 16:03:39.852 segment.go:SetEnabled:512 → Segment: Node
[TRACE] 16:03:39.852 shell.go:Pwd() - 106ns
[DEBUG] 16:03:39.852 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv venv-win pyenv-win]
[DEBUG] 16:03:39.852 properties.go:GetBool:22 → home_enabled: false
[DEBUG] 16:03:39.852 properties.go:GetStringArray:52 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .npmrc .vue]
[TRACE] 16:03:39.852 shell.go:Pwd() - 86ns
[DEBUG] 16:03:39.852 properties.go:GetStringArray:52 → folders: []
[TRACE] 16:03:39.852 shell.go:Flags() - 176ns
[DEBUG] 16:03:39.852 properties.go:GetBool:22 → home_enabled: false
[TRACE] 16:03:39.852 shell.go:Pwd() - 152ns
[TRACE] 16:03:39.852 shell.go:Pwd() - 149ns
[TRACE] 16:03:39.852 shell.go:GOOS() - 81ns
[DEBUG] 16:03:39.852 segment.go:SetEnabled:512 → Segment: Shell
[DEBUG] 16:03:39.852 properties.go:GetKeyValueMap:46 → mapped_shell_names: map[]
[TRACE] 16:03:39.852 shell.go:Shell() - 159ns
[TRACE] 16:03:39.852 shell.go:Flags() - 44ns
[TRACE] 16:03:39.852 shell.go:TemplateCache() - 264ns
[DEBUG] 16:03:39.852 text.go:Render:70 → Rendering template: at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>
[DEBUG] 16:03:39.852 text.go:Render:70 → Rendering template: in <p:blue><b>{{ .Name }}</b></> 
[TRACE] 16:03:39.853 shell.go:TemplateCache() - 581ns
[TRACE] 16:03:39.853 shell.go:Shell() - 166ns
[TRACE] 16:03:39.854 shell.go:TemplateCache() - 612ns
[TRACE] 16:03:39.854 shell.go:Shell() - 224ns
[DEBUG] 16:03:39.854 text.go:Render:70 → Rendering template: plain
[DEBUG] 16:03:39.854 text.go:Render:70 → Rendering template: plain
[DEBUG] 16:03:39.854 text.go:Render:70 → Rendering template: plain
[DEBUG] 16:03:39.854 text.go:Render:70 → Rendering template: plain
[DEBUG] 16:03:39.854 text.go:Render:70 → Rendering template: plain
[TRACE] 16:03:39.854 shell.go:Shell() - 153ns
[TRACE] 16:03:39.854 shell.go:Shell() - 81ns
[TRACE] 16:03:39.854 shell.go:Flags() - 78ns
[TRACE] 16:03:39.854 shell.go:Shell() - 84ns
[TRACE] 16:03:39.854 shell.go:Shell() - 98ns
[DEBUG] 16:03:39.855 shell_unix.go:TerminalWidth:70 → terminal width: 119
[TRACE] 16:03:39.855 shell_unix.go:TerminalWidth() - 1.280734ms
[TRACE] 16:03:39.855 shell.go:Flags() - 37ns
[DEBUG] 16:03:39.855 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.855 shell.go:Getenv(OMP_CACHE_DIR) - 3.206µs
[DEBUG] 16:03:39.855 shell.go:Getenv:399 → NO DATA
[TRACE] 16:03:39.855 shell.go:Getenv(XDG_CACHE_HOME) - 1.296µs
[TRACE] 16:03:39.855 shell_unix.go:CachePath() - 15.242µs
[TRACE] 16:03:39.855 shell.go:Flags() - 39ns
JanDeDobbeleer commented 5 months ago

@Eric-Philippe this isn't something we produce as oh-my-posh doesn't have any \x3b sequences in the code. You can also see the prompt being correctly displayed after that so something else is hijacking the prompt with that information.

vpetit-reimagine commented 5 months ago

@JanDeDobbeleer This is what I found in the oh-my-posh.psm1 file from version 2.0.399:

$prompt += "$([char]27)]9;9;`"$($location.Path)`"$([char]7)"

line 32. This is basically the same as \x3b is the semi-colon.

So this is probably still related to the integration of oh-my-posh with recent versions of VScode.

And this corresponds to basically what my terminal actually shows: image

JanDeDobbeleer commented 5 months ago

@vpetit-reimagine that version is outdated and no longer supported. You'll need to upgrade.

Eric-Philippe commented 5 months ago

I've changed the ohmyposh's theme and now everything is back to normal

The escaped characters corresponds to the end of the previous ohmyposh theme right segment

Still zero idea about why It did that specifically for this theme, specifically for the VsCode Studio Integrated terminal

But changing theme seems to be the easiest fix

Thank you

JanDeDobbeleer commented 5 months ago

@Eric-Philippe it shouldn't be rendered like this though. Seems like they did create a bug in the vscode terminal as that syntax is correct (what oh-my-posh outputs). Might be best to follow up with them if this returns.

rbuckton commented 5 months ago

The characters seem to be coming from VS Code's terminal shell integration functionality:

image

VSCode injects a custom Prompt that wraps the current prompt, but it doesn't seem to like the theme I'm using. Disabling shell integration fixed the issue for me, at least until I can figure out what went wrong with the theme I'm using.

rmscode commented 4 months ago

I just installed oh-my-posh today with winget install JanDeDobbeleer.OhMyPosh and I am facing this exact same issue in VSCode. The workaround posted by @rbuckton did not work for me.

JanDeDobbeleer commented 4 months ago

@rmscode I will try to reproduce this tomorrow. Pretty sure it's a vscode issue though. You'll also need to reload the shell when disabling that.

rmscode commented 4 months ago

@rmscode I will try to reproduce this tomorrow. Pretty sure it's a vscode issue though. You'll also need to reload the shell when disabling that.

Yeah, it's just in VSCode. Everything is great in Windows Terminal.

Fydon commented 4 months ago

Thank you @rbuckton. Given that the automatic shell integration is disabled, you may want to include the manual installation in your profile: if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --locate-shell-integration-path pwsh)" }

Fydon commented 4 months ago

After reenabling the vscode shell integration (terminal.integrated.shellIntegration.enabled) and leaving the manual installation of the vscode shell integration in my last post, I'm no longer getting the problem with random extra characters in the vscode terminal. The oh-my-posh shell_integration setting didn't appear to make a difference.

rmscode commented 4 months ago

After reenabling the vscode shell integration (terminal.integrated.shellIntegration.enabled) and leaving the manual installation of the vscode shell integration in my last post, I'm no longer getting the problem with random extra characters in the vscode terminal. The oh-my-posh shell_integration setting didn't appear to make a difference.

This worked for me, thanks! However, vscode is still being stubborn and won't render the fun icons/glyphs. I tried both CaskaydiaCove NF and FiraCode Nerd Font Mono . . . but that's probably not within the scope of the conversation here.

Fydon commented 4 months ago

I struggled to get icons/glyphs working on any Powershell terminal (Powershell, Terminal and vscode). I tried installing multiple fonts with oh-my-posh font install and by downloading them directly. Sorry I'm not sure what eventually work as I almost gave up when it worked. I am using "terminal.integrated.fontFamily": "MesloLGM Nerd Font" as suggested here.

rmscode commented 4 months ago

Icons/glyphs work fine for me in Windows Terminal, just not vscode. Thanks for the font suggestion. I'll try that.

Edit: That worked (maybe)! I installed the font as administrator this time too...could've been that.

strisys commented 4 months ago

@rbuckton fix was a fix for me.

JanDeDobbeleer commented 4 months ago

relates to https://github.com/microsoft/vscode/issues/211922

temporarily disable shell integrations to solve the issue for now:

{
  "terminal.integrated.shellIntegration.enabled": false
}
Fydon commented 3 months ago

Thank you @JanDeDobbeleer. It appears to be fixed in the latest vscode insider build, now that the vscode issue you mention was fixed.

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