Skip to content. | Skip to navigation

Personal tools
Sections
You are here: Home wiki CommandLineCompletion

CommandLineCompletion

Command Line Completion

To avail of command line completion in a Windows DOS box (command prompt) similar in effect to the default use of most Unix shells...

  1. Run regedit
  2. Navigate to "My Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor
  3. Add a new DWORD Value called !CompletionChar (Edit>New>DWORD Value) If you don't already have one here
  4. Assign !CompletionChar a value of 9 (select !CompletionChar then Edit>Modify). 9 is the ASCII value of the TAB key. It shouldn't matter if you save it as decimal or hexadecimal, 9 is 9 in either case.

It does not behave exactly like nice intuitive Unix shells, but it's close enough to make it feel a little like home.

Q: I've never used a Unix shell before, so how do I use this?

A: Say you're in a Windows DOS box (command prompt) and you want to change directory (cd) from the top of the c:/ drive into the "Program Files" directory but don't want to do a lot of typing. Just start typing "cd pr" then press the Tab key on your keyboard, the command will be filled in for you as cd "Program Files", inverted commas and all. Continuing to press the Tab key will cycle alphabetically through file and directory names at your current location or lower down a directory tree if you enter \ (backslashes) after directory names. You'll get the hang of it with a bit of practice.