Add to Technorati Favorites
Welcome to ThePowerShellGuy.com Sign in | Join | Help

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\/\/

Published Tuesday, August 28, 2007 4:06 PM by MoW

Comments

# The PowerShell Guy : PowerTab

Tuesday, August 28, 2007 4:09 PM by The PowerShell Guy : PowerTab

# re: PowerTab 0.97 released

It looks like it has some problems with directory completion using an UNC path.

For example:

\\server1\c$\Windows\[tab]

Results:

\\server1\c$\Windows

The final backslash was removed and no tab completion dialog box was presented.

Another Example:

\\server1\c$\[tab]

followed by [escape]

Results:

server1\c$\

Gets you a tab completion dialog, but if you escape the dialog, you lose the 2 back slashes before the name of the remote computer.

I'll probably just go my old version for now and look at it again when the next release comes out.  

Thanks for your, and others, great work on this.  It really makes Powershell more Powerful.

Wednesday, August 29, 2007 12:14 PM by SQL_Guru

# re: PowerTab 0.97 released

Great work.  Just one thing, when I use %[tab]tabe and select say Import-TabExpansionTheme and hit enter, I get Foreach-Object instead...

Wednesday, August 29, 2007 12:59 PM by Brimmer

# re: PowerTab 0.97 released

I fixed a small problem in the Setup.cmd (at least it was a problem on my system).  The first part of the command passed to powershell was

cd %~dp0

Which produced an error on my system, which as the PSCX extensions installed (and therefore a custom cd command).  I chose to place the PowerTab files in 'c:\program files\powertab'.

I the setup.cmd file to use Set-Location intead of cd and quoted the path since it had spaces.  It now looks like:

Set-Location '%~dp0'

and the error went away.

thanks,

mark

Thursday, August 30, 2007 1:07 PM by Mark

# re: PowerTab 0.97 released

the best:

$PowerTabConfig.ShowAccessorMethods = $false

Nice work again!

- Oisin

Thursday, August 30, 2007 4:28 PM by Oisin Grehan

# re: PowerTab 0.97 released

Brimmer,

Looks like I introduced a bug there, will look into it

Greetings /\/\o\/\/

Friday, August 31, 2007 10:58 AM by MoW

# re: PowerTab 0.97 released

Mark,

thanks, I will fix it, should learn me not to use aliases ;-)

Greeings /\/\o\/\/

Friday, August 31, 2007 10:59 AM by MoW

# re: PowerTab 0.97 released

Brimmer,

The select command is returned but also the variable % is resolved and both are returned.

I'm looking how to best solve this

the 2 workaround are :

Disable alias Quick expand %@ needed to expand %

PoSH> $PowerTabConfig.AliasQuickExpand = $false

Or choose a different shortcut character :

PoSH> $PowerTabConfig.ShortcutChars.Partial

%

as I like % to much, I do not want to change it

but I do not want the % resolving gone also.

Greetings /\/\o\/\/

Friday, August 31, 2007 11:13 AM by MoW

# The PowerShell Guy : PowerTab Version 0.98 Released

Wednesday, September 05, 2007 6:38 AM by The PowerShell Guy : PowerTab Version 0.98 Released

# re: PowerTab 0.97 released

@ SQL_Guru  :

for version 0.99 I also fixed the UNC handling with hidded shares, and the relative path support added.

http://thepowershellguy.com/blogs/posh/pages/powertab-beta.aspx

I hope this works for you

Thanks again for the input

Greetings /\/\o\/\/

Friday, September 21, 2007 11:58 PM by MoW

# Outils super sympa pour PowerShell POWERTAB

La complétion automatique à l'aide du TAB n'existe pas pour Powershell, mais les experts de thepowershellguy.com...

Anonymous comments are disabled