23
9
As we all know, Windows command-line have the white-black color scheme. And we could use:
COLOR
command to change the colors of background and text.
But the command above will change the whole text in the command-line. E.g. the result of command is as follows:
COLOR 04
But I don't want this kind of color-scheme because that makes no difference with the original white-black one. It is hard to distinguish the command you input and the output of the command. What I want is something like this:
I want the color of command prompt is different with other text on the screen so that I can find the command I input easily. But I only get the solution on Linux. It uses:
export PS1=”\[\e[35;1m\][\u@\h: \W]\$\[\e[0m\] “
So my question is:
How can I change the color of command prompt like the above one on Windows?
Thanks very much.
Solution:
Following the prompt of @Luke I finally get the solution. Anyone who is interested in this topic please hit the two links below:
https://stackoverflow.com/questions/6297072/color-for-the-prompt-just-the-prompt-proper-in-cmd-exe-and-powershell & http://gynvael.coldwind.pl/?id=130
It is "ANSI hack developped for the CMD.exe shell".
Wish that would be helpful for you.
@Luke, Citation needed for such an assertion.
– Pacerier – 2015-08-24T09:40:28.673Is it possible to make the command output a different color than the command itself? – mbomb007 – 2019-10-03T18:41:27.183
1The native Windows command prompt is not this configurable; you'll have to use a 3rd party solution. – Luke – 2012-05-22T02:08:44.873
1@Luke Is there any existing 3rd party solution you know? – None – 2012-05-22T02:35:50.757