PowerTab Version 0.98 Released
Powertab 0.98 is released ( Download it from the PowerTab Overview Page )
I have recieved some bug reports from users in the comments ( Thanks ! ) of the entry about PowerTab version 0.97 and made some other small fixes, but also 2 great new additions, an extension on the inline search for .net types more info below and I added a Custom Function feature, I the next post I will show how to use the Custom function and some very cool usage scenarios for this Function.
New Features :
- Inline Search works also for types now !
I changed Oisin's great Inline search added in PowerTab 0.97, to also support searching on .NET types, it works now after a [bracket also, making it also posible to use it when you not want to make an object but are using a .net type directly ,typing an opening bracket [ and will powertab add a closing one at the end ] automaticly so you can now[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain() as easy as 7 key strokes :
PoSH> [.dom
PoSH> ╔═ .dom ══════════════════════════════════════════════════════════════╗
PoSH> ║ System.DirectoryServices.ActiveDirectory.Domain ║
PoSH> ║ System.DirectoryServices.ActiveDirectory.DomainCollection ║
PoSH> ║ System.DirectoryServices.ActiveDirectory.DomainCollisionOptions ║
PoSH> ║ System.DirectoryServices.ActiveDirectory.DomainController ║
PoSH> ║ System.DirectoryServices.ActiveDirectory.DomainControllerCollection ║
PoSH> ║ System.DirectoryServices.ActiveDirectory.DomainMode ║
PoSH> ║ System.Windows.Forms.DomainUpDown ║
PoSH> ╚═[1] 1-7 (7/7)]══════════════════════════════════════════════════════╝
PoSH> [System.DirectoryServices.ActiveDirectory.Domain]::g
PoSH> ╔═ [System.DirectoryServices.ActiveDirectory.Domain]::g ════════════════╗
PoSH> ║ [System.DirectoryServices.ActiveDirectory.Domain]::GetComputerDomain( ║
PoSH> ║ [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain( ║
PoSH> ║ [System.DirectoryServices.ActiveDirectory.Domain]::GetDomain( ║
PoSH> ╚═[1] 1-3 (3/5)]════════════════════════════════════════════════════════╝
PoSH>
- Custom User function added
this will enable you to let powertab call your own function with the last word as a parameter, the values returned by it will be shown in the tabcompletion list, this makes it possible to take any action you want on it.
New settings for this functionality are :
$PowerTabConfig.CustomFunctionEnabled
$PowerTabConfig.CustomUserFunction
PoSH> $PowerTabConfig.ShortcutChars.CustomFunction
#
this new CustomFunction needs to be configured and is disabled by default but we can do very cool things with it, as I will show in a follow-up post by adding language translation functions to PowerTab tabexpansion :
PoSH> hello#
PoSH> ╔═ hello ══════════╗
PoSH> ║ ¿sí? ║
PoSH> ║ hola ║
PoSH> ╚═[1] 1-2 (2/2)]═══╝
PoSH> hello#
PoSH> ╔═ hello ══════════╗
PoSH> ║ hallo! ║
PoSH> ║ Hallo ║
PoSH> ║ Gruß ║
PoSH> ║ hallo rufen ║
PoSH> ║ hallo ║
PoSH> ╚═[1] 1-5 (5/5)]═══╝
PoSH> hello#
PoSH> ╔═ hello ══════════╗
PoSH> ║ allô ║
PoSH> ║ bonjour ║
PoSH> ╚═[1] 1-2 (2/2)]═══╝
PoSH>
Bug fixes :
SQL guru : some problems with directory completion using an UNC path (known error)
yes I did notice this also, Filesystem completion is very hard to do and I could not solve this yet, as most of the time it works correctly and the "normal" completion has some issues also, I still decided to add the filesystem completion. But I made it configurable so there is no need to revert to an old version for this reason you can change to "normal" filesystem expansion on-the-fly when needed to change back to normal completion by setting the following configuration parameter
$PowerTabConfig.FileSystemExpand = $false
Brimmer : I use %[tab]tabe and select say Import-TabExpansionTheme and hit enter, I get Foreach-Object instead... (changed behavour)
This was not really a bug but still unexpected behavour, when AliasQuickExpand is enabled % is resolved to foreach-object on [tab],
as this is also the default Partial completion character after the alias resolving also the list from the partial completion will be shown, when an item is choosen this will also be returned, but after foreach-object so you need to hit [tab] another time to select the choosen function.
this is very confusing so I made the following changes :
- I changed $powertab.AliasQuickExpand changed to $False by default again, so this problem will not be there in standard installation
- Moved alias expansion after the shortcut completions, so foreach-object will be added after the selected item from list (extra tab for foreach-object now)
alias expansion is disabled by default as it can interfere with filesystem completion also, and it still can be done with the @ shortcut charater, so I think this default is better, as we also have a custom alias for foreach we can still complete it in 2 way's.
%@[tab] -> foreach-object
|%[tab] -> | foreach {$_}
and as I moved the alias Quickcompletion after the shortcut completion it is placed after the list and will only be shown on esc. or another tab.
%[tab][esc]
%[tab][enter][tab]
I think this changes will make all scenarios for alias expansion workable again
Mark : Setup.cmd error as the PSCX extensions installed (and therefore a custom cd command). and error on spaces in Path (fixed)
Thanks a lot for reporting these comments and bugs in Powertab in the comments, this is really helpfull and greatly appriciated !!
and I also found a bug myself :
- BDD 2007 type information could not be added to Powertab anymore (Fixed)
I reintroduced the old bug again by accident with a former update , now BDD types will be updated correctly again see : BDD 2007
Enjoy,
Greetings /\/\o\/\/