Command Prompt customization
Command Prompt does not have nearly as many customization options available as PowerShell and ZSH, so this section will be briefer! Luckily, most of our work was done when we set up our settings.json
earlier in the chapter—Command Prompt will respect those color scheme settings.
The one thing we can customize in Command Prompt is the prompt itself. We can run the prompt
command to change it temporarily and set the PROMPT
environment variable to change it permanently.
The prompt can use ANSI escape sequences similar to the escape sequences we covered as part of the previous PowerShell section. In addition, it has special variables for placeholders such as the date and time. Run prompt /?
to see a list of all available special variables. We'll be using the following special variables:
$E
for color escape codes$T
for the current time$P
for the current path$C
/$F
for opening and closing parentheses, respectively
...