Improved Command Prompt For Windows Cmd.exe
Written by Patrick on January 4, 2008 – 9:07 pm -This is a very useful tip for anyone who regularly uses the Windows command line. The default cmd.exe prompt displays the current path on the same line that is used for input. When you are in a deep directory you don’t get much room for typing. The other problem is that the default prompt has a “>” symbol directly after the path which causes a problem when cut and pasting the current path into other windows.
You can have an improved command prompt like this:
The quick way to test this change is to enter this command at the prompt: “set prompt=$C$S$P$S$F$_$+$G$S”. The improved prompt will be enabled in the current window until it is closed.
To make the change permanent and enabled in all new cmd.exe windows:
- Windows Key + R.
- Type “sysdm.cpl” and press enter.
- Select the Advanced tab.
- Click “Environment Variables”.
- Click “New” to add a new user variable.
- Add variable name: PROMPT
- Add this value: $C$S$P$S$F$_$+$G$S
- Exit out of everything.
Now every cmd.exe window that you open will have the enhanced prompt. This gives you some benefits:
- More room to type your command.
- Separation between the current directory and the typed command.
- Double click on the current directory and paste and you have a valid path without modification.
Tags: command line, Windows
Posted in Windows |
