Powershell tab-complete trailing slash

In Powershell, when you are typing in a path, using tab-completion, directories don't get a trailing (back)slash, meaning that at each level, I have to type Tab - . Is there any way to make Powershell add the trailing backslash to directories it has autocompleted, like Bash does?


Solution 1:

PowerTab is an extension which adds Intellisense-like capabilities to Powershell. You may find that you like the way its pop-up lists and use of backslash and space to select completions works. It doesn't solve the problem of no trailing backslash, but the author says that the issue is with the way Powershell works.

PowerTab Cheat Sheet

Solution 2:

On the off-chance that someone stumbles over this in 2018:

PSReadLine is a neat module that does this and much more. Installing it is as simple as running 2 commands (In PS5 - for older versions, check the README):

Install-Module PSReadLine
Import-Module PSReadLine

With a little configuration, PSReadline can do much more advanced things, but Tab-Autocompletion, proper Ctrl-C/Ctrl-V and some other things work out of the box.

Windows 10 includes PSReadLine by default.