nightroman / FarNet

Far Manager framework for .NET modules and scripts in PowerShell, F#, JavaScript.
https://github.com/nightroman/FarNet/wiki
BSD 3-Clause "New" or "Revised" License
136 stars 19 forks source link

Complete revision of TabExpansion2.ps1 #3

Closed nightroman closed 8 years ago

nightroman commented 8 years ago

See #2 for the introduction of coming changes and the reasons.

Remove the obsolete wrapper New-CompletionResult. New-Object System.Management.Automation.CompletionResult should be used instead.

Remove support for obsolete profile names *TabExpansionProfile*.ps1. Names like *ArgumentCompleters.ps1 should be used instead.

Add new functions Register-InputCompleter and Register-ResultCompleter. They should be used instead of adding completers directly to options. Old adding to options still works but this may change later.

Improve the work around read-only result collections.

Upgrade the sample TabExpansionProfile.ps1 according to the above notes. Fix some minor code defects, including leaked completers variables.