Description
It would be nice if there was a way for the user to opt in to the auto-loading of any PowerShell Gallery modules they've installed which include editor commands written with the new extensibilty model. The user would add a cmdlet call to their chosen editor's profile which invokes this module auto-loading process. It might look something like this:
Import-EditorCommandModules [-Exclude <String[]> [-Repository <String[]>]`
The -Exclude
parameter would take a list of module names which should be excluded from the auto-loading process. The -Repository
parameter would restrict auto module loading to only the modules which were installed from the specified repositories.
When invoked, this command would use Get-InstalledModule
to find all modules and then filter them down to the specified repositories. It'd then filter them down even further to only those with a conventional tag called EditorCommand
. This would allow module authors to indicate that their module contains editor commands which can be auto-loaded.