Reputation: 321
In ~/.bash_profile, I added this line:
PS1="[\[\e[33;m\]\t \[\e[32;m\]\u@\H \[\e[31;m\]\W]\[\e[33;m\]\#\e[m\$ "
And in iterm2, the command line prompt looks like below:
How can I configure the vscode terminal prompt to be colorful ?
Upvotes: 0
Views: 373
Reputation: 182931
The basic problems are the ;
's before the m
's. Try this:
PS1="[\[\e[33m\]\t \[\e[32m\]\u@\H \[\e[31m\]\W]\[\e[33m\]\#\[\e[m\$"
Upvotes: 1