My visual studio code integrated terminal is showing some escaped ANSI codes on every command line:
x1b7x1b[38x3b2x3b122x3b122x3b122m ❮ x1b[0mx1b[38x3b2x3b159x3b211x3b86m
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
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
.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