48
24
I've used the Bash shell on Linux for years and I'm very fast with it. By frequently appealing for autocomplete by hitting the tab key, I'm able to write long commands in few keystrokes.
Recently at my job I've started using the Windows Command Prompt and Cmd. I'm very slow in Cmd. It has an autocomplete feature, but it works differently. I think I understand how it works, but I don't understand how to use it effectively, in fact it often slows me down. So I ask, how to use how to use Cmd's autocomplete effectively?
Let me give an example. First I'll describe how I use Bash, then how I try to use Cmd, and what goes wrong.
Suppose the folders in the current directory have names made from a continent and a country, eg. africa-nigeria
, asia-india
, europe-france
, and that I want to change folder to europe-norway
.
The way Bash's autocomplete works is that the tab key expands only if there is a unique expansion. Otherwise, nothing happens, but you can press tab a second time to list possible expansions.
So to move to Norway in Bash, I type cd
and then make the following keystrokes:
- e tab for
europe-
- n tab (nothing happens)
- tab again. It lists
europe-netherlands
andeurope-norway
as potential expansions. - o tab for
europe-norway
.
Great! Thanks Bash.
However, when I try the same keys in Cmd, it expands e tab to europe-albania
, which happens to be the first folder beginning 'e', but isn't the folder I wanted! What should I do now—is it possible to make Albania into Norway? Or must I cancel the command with Escape and type everything from scratch?
Can you use a menu, eg. batch menu? – Endoro – 2013-04-15T15:11:25.633
At the moment Stephan's answer is correct for you. Just type the
cd e
and then press theTAB
key. What Windows is doing here it start sorting the folders in alphabetical order in words. As If there isEurope-albania
beforeeurope-norway
, just keep pressing theTAB
key continuously until you don't get your desired directory. – avirk – 2013-04-20T01:26:11.1875@Avirk, so the quickest way from Albania to Norway is to press the tab key 27 times? – Colonel Panic – 2013-04-23T15:07:32.373