Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Under Windows, using PowerShell, is it possible to make the filename suggestion (using the Tab key) work like with bash under Linux?

Let's assume a directory contains 3 directories: example1, example and examination.

On Windows (by default), if you type cd ex and Tab, it will auto-suggest cd .\examination. Subsequent uses of Tab will rotate the suggestion between example1, example and examination.

Using bash (typically under Linux), if you type cd ex and Tab, it will auto-complete until the character where the filenames start to differ: cd exam. Another use of Tab then suggests which directories are available:

$ cd exam
examination/ example1/    example2/

Then, if you type p and Tab, it will auto-complete to example, and so on (here, offering a choice between example1 and example2).

Is there a way to make the filename suggestion work in a tree-like search like this, instead of rotating through the names?

(I'm mainly interested in file names. Bash can also refine this selection based on the file type, for example only directories for cd, which would be good, but having the file name selection itself would be enough.)

share|improve this question
up vote 3 down vote accepted

The default completion behavior is the result of using the command window, which handles keyboard input.

As of PowerShell v3, the ISE is worth considering as a full-time shell, and has modern completion behavior (and colorization!).

If you really want BASH-style completion in a PowerShell command Window, get PSReadline:

There is an older, less featured, and unmaintained project also called PSReadline here:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .