Sometime it is the Simple Things

Yes sir!  This is a short post, or at least a softball so to speak.  But as I travel and meet engineers I find that often it is the simple things that we have forgotten that can make our lives easier.

With the growth of PowerShell many of us are finding we are using a command window of one kind or another for a DOS command or a PowerShell command.  So if I can be so bold, my first recommendation is to just use the PowerShell window and not open a CMD window.  You can do all your favorite DOS commands and PowerShell commands in PowerShell.  If you haven’t made your New Year’s resolution – this is it, start launching PowerShell.

Here is my simple tip:

F7

That’s it. F7.  Don’t feel bad if you forgot or was not aware using F7 in a command window.  Here is what it does.  Once you have typed a few commands or many commands you can use F7 to see a list of the commands you have typed and can easily use your arrow keys to navigate.  Once you locate the command you want you have a choice on how it behaves.   Hit enter and the highlighted command executes.  If you want to edit the command prior to executing, then hit the left or right arrow after highlighting the command.

The other method is to not use F7 and use the up and down arrow keys to find your command.  I use both methods.  In addition, since I have exposed F7 there are other function keys as well you may be interested in.  But I do not use them:

Here they all are:

F2 – “Enter char to copy to.”  This allows you to tell it to go the nth character of the previous command.  Maybe you count as you type, but I don’t.  This may be useful sometime.  However, I cannot think of a time.

F3 – brings the previous command back (same as hitting the up arrow once, but cannot keep going up).

F7 - brings up a window with choices.

image

So I know you are going to do it, so stop reading this and open PowerShell and type a few commands then hit F7.