I am running Windows 10 and want to set up cmd.exe prompt such that it looks the same as my bash prompt on the same machine. I have set up a startup script to set the PROMPT variable when loading cmd.exe, which detects whether the shell is running with root privileges and set up the colour accordingly:
However, as shown from the screenshot, I can't set up the prompt in cmd.exe (the upper windows) such that the colour resets to default after finishing the command, as shown in bash (the lower windows). If I run bash from cmd, the colour also can't reset.
Then I run ls with colours in both shells, if I run it in cmd, or bash within cmd, the colour cannot be reset by the normal file. However, if I run it in bash only, the colour can be reset.
How can I set up my startup script such that the colour behaviour of cmd.exe is made identical to my bash shell?
.json
config file, but ConEmu is still easier to customize and run multiple shells from.