My path on my DOS prompt is ridiculously long. How can I shorten this?
C:\RUBY\Ruby_Practice\prep-work-master\coding-test-2\practice-problems\spec>
If you want to shorten a relative path that seems too long, you'll have to go to that path to make it current (i.e.: "."). Use PUSHD , CD , and POPD to go back and forth to a specific path in order to temporarily use a shorter relative path.
The path command specifies the location where MS-DOS should look when it executes a command. For example, if you were to use the "format" command, the path must be specified, or you will receive the message "bad command or file name." See our path definition for a full explanation and examples of paths on computers.
To remove the path from the prompt use 'prompt $g' which will just show the chevron. You can then use the 'cd' command anytime to see the directory you are in. E.g.
C:\Windows\System32\drivers\etc>prompt $g > >cd C:\Windows\System32\drivers\etc >
Right-click on My Computer|Properties. Then from the Advanced Tab, click Environment Variables, then add a new User Variable called PROMPT and set it to $p$_$+$g
.
http://www.hanselman.com/blog/ABetterPROMPTForCMDEXEOrCoolPromptEnvironmentVariablesAndANiceTransparentMultiprompt.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With