Powertab 0.92 PowerShell improved TabExpansion function library
And another update in the PowerTab PowerShell TabExpansion series , a new version of the PowerShell tabExpansion script library, PowerTab 0.92 is released, with again, I think, some really cool additions !
Main addition is, that in Version 0.92 PowerTab does also support parameter completion on Functions and scripts, so you will have instant parameter tabcompletion on your self created Functions and scripts !
PowerTab092.Zip Download or get it from the Overview Page !
If you are using PowerTab for the first time with this version , as there is a lot of functionalty added to the standard tabcompletion to make best use of it, be sure to check out the rest of the series !,
For more information about the PowerTab suite see the PowerTab Overview Page where you allways can find the latest version for download, or you can use the TagList PowerTab to get a list of all former posts about the PowerTab library.
* Upgraders note * , if you not use the PowerTabSetup.PS1 setup routine , or skip profile change, there is one extra profile line, :
. '$installDir\Get-ScriptParameters.ps1' # Get Parameters of Scripts
List of updates from version 0.91 :
- Parameter Completion on Functions and Scripts
- Renaming of some utility scripts to better follow PowerShell naming rules
- get-TabExpansion now also supports Type and WMI searching.
- "In Place" invokation
- Updated setup script ( PowertabSetup.PS1 )
- CustomLib.PS1 example library added
- removed databases for aliases, functions and cmdlets (not used for some time)
- added Add-TabExpansionEnumFromLastError Function to Library
- Other small changes
PowerTab092.Zip Download
Parameter Completion on Functions and Scripts
You now have instant tabcompletion on your own created functions and scripts ! :
From the moment you define a function you can Tabcomplete on the parameters, but more it also workd on scriptfiles ! , see the following examples :
PoSH> function test ($foo,$bar,$foobar) {'Function Parameter Completion'}
PoSH> test -
PoSH> -
PoSH> -bar
PoSH> -foo
PoSH> -foobar
PoSH> [ 1 of 3 ]
PoSH>
PoSH> Set-Content TestScript.ps1 @'
>> # This is a test Script
>> PARAM ($foo,[string]$string,
>> $Mandatory = (trow 'Mandatory'),
>> [Switch]$verbose
>> )
>> "Script Parameter completion"
>> '@
>>
PoSH> F:\PowerShell\TestScript.ps1 -
PoSH> -
PoSH> -foo
PoSH> -Mandatory
PoSH> -string
PoSH> -verbose
PoSH> [ 1 of 4 ]
PoSH> help -
PoSH> -
PoSH> -Category
PoSH> -Component
PoSH> -Detailed
PoSH> -Examples
PoSH> -Full
PoSH> -Functionality
PoSH> -Name
PoSH> -Parameter
PoSH> -Role
PoSH> [ 1 of 9 ]
Also as you see above, that now parameter completion on Help also works, what I find very hady in this case, as this is a function not an alias to help-object as you might think
Renaming of some utility scripts to better follow PowerShell naming rules, :
On request of Jeffrey Snover himself (and who with a PoSH mind can refuse that ? , Sorry I'm so late with it J )
Load save- -> import export
Refresh -> update
Find -> Get
also I changed Edit-TabExpansion to Invoke-TabExpansionEditor
So the new list of helper functions is :
PowerTab Utility functions :
Name
----
add-tabExpansion
add-TabExpansionComputersNetView
add-TabExpansionComputersOU
add-tabExpansionEnum
Add-TabExpansionEnumFromLastError
Export-tabExpansionDataBase
get-tabExpansion
get-TabExpansionComputer
get-TabExpansionCustom
Import-TabExpansionDataBase
Invoke-TabExpansionEditor
New-tabExpansionDataBase
Remove-tabExpansion
Update-TabExpansion
Update-TabExpansionTypes
Update-TabExpansionWmi
get-TabExpansion ( formerly Find-TabExpansion ) also supports Type and WMI searching.
PoSH> get-tabExpansion -
PoSH> -
PoSH> -filter
PoSH> -Type
PoSH> [ 1 of 2 ]
PoSH>
PoSH> get-tabExpansion -filter '*RegEx*' -Type Types | Format-Table -AutoSize
Name DC NS
---- -- --
System.Configuration.RegexStringValidator 2 System.Configuration
System.Configuration.RegexStringValidatorAttribute 2 System.Configuration
System.Text.RegularExpressions.Regex 3 System.Text.RegularExpressions
System.Text.RegularExpressions.RegexCompilationInfo 3 System.Text.RegularExpressions
System.Text.RegularExpressions.RegexOptions 3 System.Text.RegularExpressions
System.Text.RegularExpressions.RegexRunner 3 System.Text.RegularExpressions
System.Text.RegularExpressions.RegexRunnerFactory 3 System.Text.RegularExpressions
PoSH> get-tabExpansion '*Share*' WMI | Format-Table -AutoSize
name Description
---- -----------
Win32_ConnectionShare The Win32_ConnectionShare class represents an association between a shared resou...
Win32_LogicalShareAccess Association between the security settings of a share and one member of its DACL
Win32_LogicalShareAuditing Association between the security settings of a share and one member of its SACL.
Win32_LogicalShareSecuritySetting security settings for a logical file
Win32_PrinterShare A generic association to establish dependency relationships between objects.
Win32_SecuritySettingOfLogicalShare Security settings of a share object
Win32_Share The Win32_Share class represents a shared resource on a Win32 system. This may b...
Win32_ShareToDirectory The Win32_ShareToDirectory class represents an association between a shared reso...
PoSH>
added Add-TabExpansionEnumFromLastError Function to Library
Added the function from PowerShell : Extract the Possible Enum values from Last Error and add to TabCompletion , to the Library for more information see that post.
Other Changes
"In Place" invokation , by adding invoke as type to a custom
Updated setup script ( PowertabSetup.PS1 ) , alias, function and Cmdlet fill gone, ask if you want to load Custom examples
CustomLib.PS1 example library added
In the CustomLib.PS1 libary I will collect usefull sample for using the custom Tabcompletion functions and I will provide an update to it later.
for example the PowerShell TabExtension - Part 8 Tip Use Custom Expansion to switch help Modes fast examples are provided in this library be sure to take a look at it for ideas, if you have some tips or handy examples please leave them in the comments, or send them to me and I will add them to the library !
Enjoy,
Greetings /\/\o\/\/