A quick little note about Tab completion in the Windows command prompt

Alonso Del Arte
2 min readSep 2, 2021
Photo by Demi DeHerrera on Unsplash

Maybe you already know about how you can use the Tab key to complete partial typing on the Windows command prompt. Or maybe you don’t know this.

If you are a computer programmer who mostly uses Windows and you don’t already know about this, you need to read this article. And if you are a computer programmer who mostly uses Mac, maybe this feature is also available on all the shells you can use for the Mac Terminal.

I’ve been using the Windows command prompt for years, all the way back to a time when the Windows command prompt was the DOS command prompt. But I didn’t know about Tab completion until a couple of years ago, when I started studying Scala.

Tab completion is usually available in the local Scala REPL. Then one day, I wondered if maybe it’s also available in the Windows command prompt. It is.

Let’s say I’m in my computer’s Documents directory and I want to go to the NetBeans Projects directory. It’s not difficult to type “NetBeansProjects,” since I don’t have to get the capitalization correct. But if I’m in a hurry, it’s easy to get the letters mixed up.

Thanks to Tab completion, I only need a few letters. At the command prompt, I type

C:\Users\AL\Documents>cd net

then I press the Tab key. And voilà, the computer fills out the rest:

C:\Users\AL\Documents>cd NetBeansProjectsC:\Users\AL\Documents\NetBeansProjects>

If there are multiple matches, you can cycle through them by pressing the Tab key again and again.

C:\Users\AL>cd ideaC:\Users\AL>cd .idea-buildC:\Users\AL>cd .IdeaIC2019.3C:\Users\AL>cd IdeaProjects

Though in that case I prefer

C:\Users\AL>cd ideap

to get to the Idea Projects folder.

I hope you find this as useful as I do.

--

--

Alonso Del Arte

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified