Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show codes on VS Code (ver 1.90.0) integrated terminal

Windows powershell in my vscode appears this line of code when opened:

\x1b7\x1b[38\x3b2\x3b89\x3b201\x3b165m \x1b[0m\x1b[38\x3b2\x3b224\x3b222\x3b244min \x1b[38\x3b2\x3b75\x3b149\x3b233m\x1b[1mpwsh\x1b[22m\x1b[27m\x1b[38\x3b2\x3b224\x3b222\x3b244m \x1b[0m\x1b[38\x3b2\x3b224\x3b222\x3b244mat \x1b[38\x3b2\x3b75\x3b149\x3b233m\x1b[1m11:41:12\x1b[22m\x1b[0m\x1b8

enter image description here

If I relaunch command

oh-my-posh init pwsh | Invoke-Expression

the ANSI codes disappear.

How to fix? Other solutions?

like image 962
Minh Avatar asked Nov 23 '25 13:11

Minh


1 Answers

I also have the same problem with the exact same ANSI escape code I found a working Solution which is the following: -replace the contents of "C:\Users<Your_Username>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1"

with the contents of this file:

https://github.com/microsoft/vscode/blob/1e790d77f81672c49be070e04474901747115651/src/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1

thanks to Kevazy over on the VSCode GitHub!

(Copied this from my answer to another question on here, seems to be a current problem a lot of ppl are having)

like image 69
Mhyt0z Avatar answered Nov 25 '25 09:11

Mhyt0z