Customizing Windows Command Prompt

Having spend much time switching between Windows, Linux and OS X. I figure my Windows Command Prompt could use a little tweak at least on the PROMPT.

Basically from this single line prompt



To this (basically making the path section on a separate line than the prompt input)


Just like on other platform, the command prompt load it's configuration from the environment variable, and the variable that changes the prompt is "PROMPT".. duh...

Head over to configure Environment Variable on Windows and add a new variable to overwrite PROMPT


Setting it to $P$G$_$$ should do the trick.

You can also modify the prompt using the SETX command to modify the global environment variable. So just type this on a prompt

SETX PROMPT  $P$G$_$$

Following is a list of variable that you can use to customize the prompt

 $A   & (Ampersand)
 $B   | (pipe)
 $C   ( (Left parenthesis)
 $D   Current date
 $E   Escape code (ASCII code 27)
 $F   ) (Right parenthesis)
 $G   > (greater-than sign)
 $H   Backspace (erases previous character)
 $L   < (less-than sign)
 $N   Current drive
 $P   Current drive and path
 $Q   = (equal sign)
 $S     (space)
 $T   Current Time
 $V   Windows version number
 $_   Carriage return and linefeed
 $$   $ (dollar sign)


Minor tweak and the prompt just looks cleaner.

Comments

Popular posts from this blog

Generating INSERT statement from SELECT using SQuirreL SQL

OneNote: We need the password to sync this notebook (Error code: 0xE4010643)

Fixing the AKE BC398 USB3.0 sluggish performance