如何配置vscode终端命令行提示符颜色?

时间:2020-07-09 03:47:21

标签: visual-studio-code

在〜/ .bash_profile中,我添加了这一行:

PS1="[\[\e[33;m\]\t \[\e[32;m\]\u@\H \[\e[31;m\]\W]\[\e[33;m\]\#\e[m\$ "

在iterm2中,命令行提示符如下所示:

enter image description here


但是,当我启动vscode并打开终端时,终端如下所示:

enter image description here

如何将vscode终端提示配置为彩色?

1 个答案:

答案 0 :(得分:1)

基本问题是;之前的m。试试这个:

PS1="[\[\e[33m\]\t \[\e[32m\]\u@\H \[\e[31m\]\W]\[\e[33m\]\#\[\e[m\$"

相关问题