"Weird" characters are visible in VSCode Git Bash terminal output (like this: `←[90m` )
Hello, fellow theoists! I'm watching a new video from Theo, and have an issue after running
pnpm db:push
command inside VSCode "Git Bash" terminal, in Windows 10.
I see some "weird" characters inside of my console.
The issue does not exist in Command Prompt
terminal.
I think the problem related to how git bash
is interpreting something from this list:
- [ ] ASCII escape characters
- [ ] ASCII spacing characters
- [ ] color codes for console theme
1) What is this ←[90m
in the git bash
console?
2) How to remove ←[90m
from git bash
terminal output?
3) How to hide this ←[90m
, or how to make it invisible?
4) Can ←[90m
be replaced with space
?
5) I have never seen such characters before. Or at least I didn't notice them before, like never 😉
Theo - t3․gg
YouTube
From 0 to Production - The Modern React Tutorial (RSCs, Next.js, Sh...
The Modern React Tutorial is FINALLY done. This one took awhile.
Shoutout to ALL the awesome sponsors who made this possible:
- Vercel
- Clerk
- Posthog
- Sentry
- Upstash
NOTES I MENTION DURING VIDEO
"Nextgram": https://github.com/vercel/nextgram/tree/main/app
"useUploadThingInputProps": https://gist.github.com/t3dotgg/0464ca78e94acce80ba04ca...
4 Replies
git bash is just bad
more over its the font not handling it well
try with wsl or the default terminal
I do not want wsl or default terminal. Theo is using VSCode in his native OS, which is MacOS, right?
I want to do the same but for Windows to use git bash in VSCode
Font is unrelated to the issue at hand. It is the ascii characters that are misbehaving inside git bash, I think.
Because I changed the console font to 'Fira Code' or 'Consolas', it looks different (as it should based on installed font), but weird characters still persist inside git bash terminal.
Why is it bad? I have been using it since I started to learn HTML, and it has been ok exp for me 🙂
then keep using it!
mostly because its a emulation
When I was using Windows, I always installed a console emulator (e..g ConEmu). It adds a lot of useful features to Git Bash. I would not be surprised if it can handle ANSI colors.
An alternative is using zsh instead of bash (https://gist.github.com/fworks/af4c896c9de47d827d4caa6fd7154b6b)
Gist
Zsh / Oh-my-zsh on Windows Git Bash
Zsh / Oh-my-zsh on Windows Git Bash. GitHub Gist: instantly share code, notes, and snippets.