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

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?

share|improve this question

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

share|improve this answer
I tried using it before asking this question, but I couldn't figure out how to install it, and the docs are completely lacking. Any idea how to do that? – tghw Sep 25 '10 at 13:19
@tghw: Yeah, the docs are pretty bad. Unzip the file into Documents\WindowsPowerShell\Modules so you have a new directory under that called PowerTab. Then in PS do Import-Module powertab. See this for further instructions. You will get error messages (and will need to/unless you) manually create a directory and some files. – Dennis Williamson Sep 25 '10 at 15:56
Thanks! I'll give that a try. – tghw Sep 26 '10 at 13:54
PowerTab will not add trailing backslashes to a directory, but it does support recursive tab expansion based on typing a backslash. The reason for this is that it would break chaining of tab expansion. PowerShell will only call a new TabExpansion() if the command line has changed since the last TabExpansion(). So adding a backslash to the result would mean that you could not press <TAB> again. – JasonMArcher Oct 16 '10 at 17:23

You must log in to answer this question.

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