10 Nov 2019

Pimp Your Command Prompt/Cmd in Windows

Bored with plain old command prompt? You’re in the right place then. Welcome.

Let’s start by changing the format of your current CMD. Follow along and please do ask if you get stuck somewhere.

  1. Open your CMD / Command Prompt , copy this > setx prompt $$ $C$P $L--$G $D$F$_$C$$$F -$G and paste it. Then press enter. (You might have to restart your CMD / Command Prompt)

  2. Your CMD should now look something like

    $ (C:\Windows\Temp <--> 2017-08-03)

    ($) -> █


    If you do not like this format then you can customize it yourself. Enter prompt /? and see the formatting options. For your convienence they are mention below:
    Start with setx prompt then make your own format as above.

     - $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) 
     - $M       Display the remote name for Network drives
     - $N       Current drive 
     - $P       Current drive and path 
     - $Q       =           (equal sign) 
     - $S                    (space) 
     - $T       Current time 
     - $V       Windows NT version number 
     - $_       Carriage return and linefeed 
     - $$       $           (dollar sign)
     - $+       Will display plus signs (+) one for each level of the PUSHD directory stack
     
  3. I’m guessing you haven’t changed the font and color yet. In case you have or you like the default one skip this step. Right click on the title bar and go to properties , select Font tab and choose any font of your liking. Then go to Colors and choose your preferable color for screen text and screen background. After you’re done press OK.

Very simple, Isn’t it?
Now let’s add a feature that preserves history between sessions and tab on completion. This is very simple just download Clink and install it.

Annnnnd!! You’re done. Congratulations!


Tags:
0 comments