I'm using the Cmder package for my Windows command line environment. Some commands don't create a blank line after they've completed, which can make it more difficult to see every command that's been run. Is there a way to customize the command prompt so that it prints a new line before displaying the path and prompt?
Asked
Active
Viewed 619 times
2 Answers
1
The classic DOS prompt is c:\Windows> which is set by using the system variable PROMPT to "$P$G". (With newer versions of Windows, it's not an environment variable but you can still use the prompt command to set it.)
Change the value for PROMPT to add $_ where you see fit. That will add a new linefeed to the prompt. I added $s to get a space after the >.
C:\Users\me> prompt $P$_$G$s
C:\Users\me
> dir \
Volume in drive C has no label.
Volume Serial Number is 5CE6-9877
Directory of C:\
08/22/2013 08:22 AM <DIR> PerfLogs
03/05/2014 10:25 AM <DIR> Program Files
03/05/2014 10:26 AM <DIR> Program Files (x86)
01/22/2014 05:14 PM <DIR> Users
01/22/2014 06:15 PM <DIR> Windows
0 File(s) 0 bytes
5 Dir(s) 36,451,704,832 bytes free
C:\Users\me
>
BTW, the list of prompt options can be found at http://technet.microsoft.com/en-us/library/bb490977.aspx
SaxDaddy
- 4,137