If you've followed my guide, Getting Started With POSTed
, then you've already installed the POSTed Development Kit and set up a shortcut to the editor folder on the desktop. Now we need a command prompt shortcut.
You can create your new shortcut on the desktop too, or simply stuff it into the System folder or the POSTAL2Editor folder itself. Right-click on the desktop or the Explorer window of the folder you wish to create the shortcut in, select New, then select Shortcut.
When prompted for the location of the item, enter "cmd.exe" and press Enter. Accept the default for any further prompts, and you will have a cmd shortcut! However, if you attempt to open this shortcut, you'll find that it opens up by default to the Windows directory. This isn't what we want at all, so close that out, then right-click your cmd shortcut and hit Properties.
We want to change the "Start in" value so it doesn't start in the Windows folder. Simply delete the contents of that field, so it appears blank. If it's blank, it will use the folder you launched in as the working folder. Hit OK to save changes, and now try launching your new shortcut.
Now you're in your System directory, but the path name is so damn long that if you start typing in a command it's going to wrap around the edge, making it difficult to read. What to do now?
Thankfully, you can redesign the way the Windows command prompt looks, using the Prompt command. For example, if you do this...
...you'll find that your command prompt now looks like this:
This, however, is a bit too much. It's useful to know what your working directory is. So what we'll do is use the Prompt variables to craft us a command prompt that will work for us. If you type:
you'll get a list of variables you can use in the Prompt command. We want to print the working directory, then advance to the next line, and then print out a bracket or a greater-than sign to use as our prompt. This way the command we type won't go off the side of the window 90% of the time.
This will give us something that looks like this:
If you put a space after the bracket, then your cursor will be spaced out from the bracket accordingly. Feel free to use the prompt variables to "dress up" your prompt to your liking. Here's what I used:
prompt [$t] $p$_]
You can also use ANSI escape sequences to do fancy things like colorizing your prompt, but I'll leave that as an exercise to the reader.
Once you have a prompt to your liking, you'll need to set your cmd.exe shortcut so that it uses your new prompt every time, otherwise it will revert to the default Windows prompt. What you're going to do is right-click and edit your cmd.exe shortcut, add the /k switch, and then put your prompt command. The /k switch tells cmd.exe to execute the following command, and then stay open for further commands. When you get done, your cmd.exe shortcut should look something like this:
And give you a resulting command window like this:
Congratulations! Now, on to actual POSTAL 2 related stuff!