📅 2011-Jul-30 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ modules, powershell, powertab ⬩ 📚 Archive
Auto-completion by pressing the Tab key is built into PowerShell. In PowerShell jargon, this is called tab expansion. Everything, including commands, command history, paths, .Net object methods and properties can be queried and completed using tab expansion. With each press of the Tab key the next possible auto-completion alternative is displayed in-place at the prompt.
PowerTab is a must-have module for PowerShell if you love its tab expansion. PowerTab takes the tab expansion a notch higher by displaying a drop-down menu of the possible options when the Tab key is pressed. Use Tab or Up/Down keys to cycle through the options and press Enter to pick the option. Sweet! 😁
Installation
The execution policy of PowerShell needs to be changed to allow execution of unsigned scripts. To find out how to do this, go here.
If you have not already done so, create a default profile script for your username. To find out how, go here.
Open PowerShell and find out the paths where it looks for modules. This can be done by typing $env:PSModulePath
. The typical directory for modules is %USERPROFILE%\Documents\WindowsPowerShell\Modules
You may have to create this directory if it does not exist.
PowerTab can be downloaded from here. It comes in the form of a ZIP file. Unblock the zip file. Unzip it and a PowerTab
directory is created.
Place the unzipped PowerTab
directory into the above Modules
directory.
In PowerShell, type Import-Module PowerTab
to install the module. It will take you through a textual wizard, pressing Enter
is enough for most of the questions it asks.
During the wizard, the PowerTab installation will spew out a PowerTab initialization code. Paste this initialization code into your profile script. This enables PowerTab to be imported whenever PowerShell is started.
That is it! PowerTab should be available on all your PowerShell journeys. Bon voyage! 😁
Tried with: PowerTab 0.99.6 and PowerShell 2.0