mrkarma4ya
4 months ago
484
4
General

Cannot get ANSI colors to work in VS Code Git Bash integrated terminal

Posted 4 months ago by mrkarma4ya

I spent around 2-3 hours yesterday searching for a solution, but I haven't found any.

I know this isn't strictly Laravel related, but Laravel is the first thing I'm learning other than basics, so I don't know where else to ask. I'm only using git bash for Laravel as of now.

I'm using Git Bash as the integrated terminal in VS Code. However, ANSI colors are not working and instead I'm getting the codes to replace them.

Here's a screenshot: https://imgur.com/3yqbRfM I followed both the answers in this post: https://stackoverflow.com/questions/42102657/bash-terminal-colors-in-integrated-terminal-in-vs-code

The first answer got rid of the color codes but did not display colors, only in the external terminal. No change in integrated terminal, even after putting the aliases.

The second answer also kinda worked, it got me the colors. Everything is repeated twice, so it's difficult. Here's an example: https://imgur.com/cBcrrb7 Please help me get the colors working, or maybe just get rid of ansi overall in php artisan commands, without having to put --no-ansi in every command.

Please sign in or create an account to participate in this conversation.