skip to Main Content

My visual studio code integrated terminal is showing some escaped ANSI codes on every command line:

x1b7x1b[38x3b2x3b122x3b122x3b122m ❮ x1b[0mx1b[38x3b2x3b159x3b211x3b86m

enter image description here

Those are the current settings related to the terminal:

"terminal.integrated.fontSize": 12,
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.defaultProfile.windows": "PowerShell",
"terminal.integrated.enableImages": true,
"terminal.integrated.persistentSessionReviveProcess": "never"

I also have Oh My Posh 19.24.2 configured through PowerShell user profile:

oh-my-posh init pwsh --config "C:UserssergiAppDataLocalProgramsoh-my-poshthemesslimfat.omp.json" | Invoke-Expression

How to fix?

2

Answers


  1. You need to disable shell integrations in vscode. If you want to enable shell integrations, you can do from your oh-my-posh config using "shell_integration": true.

    Login or Signup to reply.
  2. Hello i have the same issue but, disable shell integration doesnt help.
    If i relaunch command oh-my-posh init pwsh | Invoke-Expression ANSI codes disappear.

    ANSI codes : x1b[38x3b2x3b224x3b222x3b244min x1b[38x3b2x3b75x3b149x3b233mx1b[1mpwshx1b[22mx1b[27mx1b[38x3b2x3b224x3b222x3b244m x1b[0mx1b[38x3b2x3b224x3b222x3b244mat x1b[38x3b2x3b75x3b149x3b233mx1b[1m00:1

    Regards

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search