PowerTab 0.97 released
Yes, again a new version of the PowerTab tabcompletion library is released,( Download it from the PowerTab Overview Page )
With the changes in the setup proccess installations and especialy the updating process should be easy and smooth, just doubleclicking Setup.cmd and keep hitting enter ;-)
Y\In PowerTab 0.97 ou will get 2 new configuration settings and I think a very cool and usable new .NET type inline search feature extra, more information below.
Bug fixes
- shortcut character was not removed correctly when shortcut characters where changed, I made some fixes in changing Schortcuts to custom characters
- Tabexpansion was not triggered after a () block with an expression, a bit advanced usage but it is fixed what means that now you can do things like this again:
PoSH>
PoSH>
PoSH>
PoSH>
PoSH>
PoSH> ( "" ).Normalize( [System.Text.NormalizationForm]::FormC )
PoSH> ╔═ ( "" ).n ════════╗ ╔═ [System.Text.n ════════════════╗╔═ [System.Text.NormalizationForm]:: ═════╗
PoSH> ║ ( "" ).Normalize( ║ ║ [System.Text.NormalizationForm] ║║ [System.Text.NormalizationForm]::FormC ║
PoSH> ╚═[1] 1-1 (/38)]════╝ ╚═[1] 1-1 (/26)]══════════════════╝║ [System.Text.NormalizationForm]::FormD ║
PoSH> ║ [System.Text.NormalizationForm]::FormKC ║
PoSH> ║ [System.Text.NormalizationForm]::FormKD ║
PoSH> ╚═[1] 1-4 (4/4)]══════════════════════════╝
PoSH>
PoSH>
PoSH>
Changes :
- renamed export/import-powertabconfig import/export-TabexpansionConfig, is now consistent with the naming of the other functions,
To list all Powertab Utilities you can use :
%[tab]tabe
PoSH> %tabe
PoSH> ╔═ tabe ════════════════════════════╗
PoSH> ║ add-tabExpansion ║
PoSH> ║ add-TabExpansionComputersNetView ║
PoSH> ║ add-TabExpansionComputersOU ║
PoSH> ║ add-tabExpansionEnum ║
PoSH> ║ Add-TabExpansionEnumFromLastError ║
PoSH> ║ add-TabExpansionTypes ║
PoSH> ║ Export-tabExpansionConfig ║
PoSH> ║ Export-tabExpansionDataBase ║
PoSH> ║ Export-TabExpansiontheme ║
PoSH> ║ get-tabExpansion ║
PoSH> ║ get-TabExpansionComputer ║
PoSH> ║ get-TabExpansionCustom ║
PoSH> ║ Import-tabExpansionConfig ║
PoSH> ║ Import-TabExpansionDataBase ║
PoSH> ║ Import-TabExpansiontheme ║
PoSH> ║ Invoke-TabExpansionEditor ║
PoSH> ║ New-tabExpansionDataBase ║
PoSH> ║ Remove-tabExpansion ║
PoSH> ║ TabExpansion ║
PoSH> ║ Update-TabExpansion ║
PoSH> ║ Update-TabExpansionTypes ║
PoSH> ║ Update-TabExpansionWmi ║
PoSH> ╚═[1] 1-22 (22/218)]════════════════╝
PoSH>
PoSH>
New Features :
- Oisin's great extension to the PowerTab .net type completion, to inline search .NET types without specifying a namespace first, very quick and great for usage with New-Object and for filling parameters read more about it in his post :
Extending MoW's PowerTab - Inline Type Search
Is now Included in the default PowerTab installation. for example In the example above you could now do this :
( "" ).Normalize( .nor[tab]
- Showing of Compiler property accessor methods (get_ / Set_ ) for properties now configurable
$PowerTabConfig.ShowAccessorMethods = $false
- Trigger to expand list now configurable :
PoSH> $PowerTabConfig.MinimumListItems
2
You can now set this to only trigger the console list if there are more than a configurable amount of items returned, before the number of items in this property Powertab will not show the list but only cycle in Tab as in the normal tabcompletion
Improved Update process
I made a couple of changes to the Setup also
1) I added a batch file : Setup.cmd , and this Setup.cmd will unblock the PowerTabSetup.ps1 and will start PowerShell to launce the PowerShell setup script. ( thanks to Aaron Lerch for reminding me of this solution to unblock the script from CMD that triggered me to make a batchfile to enable users start the powertab setup script by a simple doubleclick on this batchfile from explorer)
2) The Defaults change now when doing on an upgrade, so by default the Profile will not be changed as a former version is found,
A new installation will behave the same as before ( for a complete overview of the fresh installation process see : PowerTab 0.96 Beta 3b ) , below I will show what has changed when doing an upgrade
PoSH> cd C:\PowerShell\PowerTab
PoSH> C:\PowerShell\PowerTab\PowerTabSetup.ps1
PowerTab 0.97 PowerShell TabExpansion Setup
Press Enter to start the Powertab Setup
This setup script can be used to do a clean install of Powertab or it can be used to update an existing PowerTab script
library
the Setup will configure powershell by :
1) Creating a default configuration and saving it to an XML file,
2) updating the PowerShell profile to add the code to start PowerTab when needed,
3) create and fill or update the Tabexpansiondatabase when needed
When you are upgrading PowerTab by default only the configuration is updated by setup (step one) the current profile a
nd database will be preserved, if you do accept the default on all questions
Press enter to Continue, Ctrl-C to Quit:
There will be no need to create a new database the current database will be used and all custom additions will be preserved only the Configuration will be upgraded.
So now as wel for a fresh installation or for an upgrade the setup will be as easy as this :
New Installation or Upgrade procedure of PowerTab :
- DoubleClick Setup.cmd and accept all the defaults on all question by hitting enter !.
When Starting Setup.cmd for upgrading you get the following message
WARNING: Error while loading the PowerTab configuration !, version of configuration file not correct !
WARNING: Configuration of PowerTab version 0.96 Beta 3 found while PowerTab version 0.97 was expected ! If powertab
library files are updated please run PowerTabsetup.ps1 again to update configuration
WARNING:
If you started Setup.cmd to upgrade Powertab this is an expected situation, you can just continue and the powershell
setup script will start after the profile is loaded and update the configurationdatabase to the right version
as PowerTab on startup checks the configuration database and will detect it is a wrong version
As Setup.cmd when starting PowerShell will run the profile to load existing database to upgrade it in memory, this is expected and can be ignored, the upgrade will start directly after the profile is loaded.
Upgrade process :
You can see that the setup detects profile and current database in memory, also it will detect an existing database :
Watch out ! existing PowerTab configuration found in profile !
PowerTab startup code only needs to be added once, only needed for first installations or when this code was not added t
o profile before !
If you are upgrading from a version later as Powertab 0.95 no profile changes will be needed when upgrading , you can sk
ip this part of setup and just leave the code in the profile 'as is' !
when Upgrading from an older version of powertab note that the installer will only append new PowerTab configuration to
Profile, it will not remove old information from Profile, you need to clean up old configuration from former version man
ualy
do you want to skip the update of the Profile ?
Skip Profile update ?
if you pick No you can update profile anyway
[N] No [Y] Yes [?] Help (default is "Y"):
Tabexansion Database :
Create or Update Tabcompletion DataBase
the TabCompletion database is used to store Type, WMI and Custom expansion information
This information is used and needed for a lot of the extra functionality added by powertab
This database by default will be saved as : TabExpansion.xml
In directory : C:\Users\MvanOrsouw\Documents\WindowsPowerShell
existing Powertab database found in memory !
this database will be upgraded if you do not generate a new database or load the existing one
Use currently loaded Tabcompletion Database
Upgrade existing TabcompletionDatabase in memory ?
[N] No [Y] Yes [?] Help (default is "Y"):
Database with same name and location found, if you choose Yes at the end of setup it will be overwritten
To save the new database with another name or in an other location
when you are upgrading from version 0.9x or higher of Powertab generating a new database is most likely not needed
Import this TabExpansion Database to update ?
Import TabExpansion Database ?
load this TabcompletionDatabase in memory to update ?
[N] No [Y] Yes [?] Help (default is "N"):
Filling or updating the Powertab Tabexpansion database
Retrieve the data needed for Powertab from the different sources and fill or update the Tabexpansion database with it
.NET Types
The Type information of the loaded .NET namespaces will be enumerated and added to the Database
Load .NET types
Load Types into TabcompletionDatabase ?
[N] No [Y] Yes [?] Help (default is "N"):
also the default to all folowing database update question will be set to No so you can just keep on hitting Enter to skip them.
I hope this changes make the install and update process as easy and convienent as possible now.
Enjoy,
Greetings /\/\o\/\/