如何在 VSCode 集成终端中更改文本的字体颜色? [英] How to change font color of text in VSCode integrated terminal?
问题描述
我想轻松区分 VSCode 终端中的输入命令和终端输出.因此,如果我可以更改my-Macbook-Air:Folder myname$"的颜色或字体,那将非常有帮助.
来自互联网的示例图像:
VSCode 集成终端如何实现?
查看这两个用于修改 bash 提示的来源 - 包括颜色:
如果您在阅读我引用的这两篇文章时需要进一步帮助,请告诉我们.
<小时>我找到了这两个修改 bash 提示的来源 - 我喜欢第一个:
I want to easily distinguish between my input commands in the VSCode terminal and the terminal output. So if I could change the colour or font of the, in my case, "my-Macbook-Air:Folder myname$", it would be very helpful.
Sample image from internet:
How can this be done in VSCode integrated terminal?
Look at these two sources for modifying your bash prompt - including colors:
change and color the bash prompt
change and color the bash prompt - 2
It is relatively simple to modify your bash prompt, and have it be a different color than any commands you input. You will need to know where your .bashrc
or .bash_profile
file is, the articles lay out the steps quite well. You can't modify the terminal font for just the prompt and not the commands though. But you can make the prompt appear bold, underlined, reversed, etc.
As an example, try
export PS1="\[\033[33m\]~/\W ==> \[\033[m\]"
in your .bashrc
file. It will change the color of the working directory and prompt to yellow.
If you need further help working through those two articles I cited, let us know.
I found these two sources for modifying a bash prompt - I like the first one:
bash prompt generator and bash $PS1 generator
这篇关于如何在 VSCode 集成终端中更改文本的字体颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!