PowerShell / PowerShell/PowerShellEditorServices

Provide a way to enable auto-loading of editor command modules

未关闭
#215 4 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Issue-Discussion Issue-Enhancement
主要语言
C#
星标
767
派生
266
平均合并
3 天 16 小时
30 天内合并 PR
1

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从提议的 Import-EditorCommandModules 入口点以及用户将从中调用它的编辑器配置开始。检查 Get-InstalledModule 如何公开已安装的模块和存储库,然后定义对 -Exclude、-Repository 和 EditorCommand 标签的筛选。完成的标准是,选择加入加载时只能找到符合条件的模块,并同时遵守两个筛选条件。

由索引模型根据 Issue 内容生成。

评估

技术栈
powershell
领域
tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。