PowerShell / PowerShell/PowerShell
Get-Command can't resolve commands entered by omitting the Get-* verb, though command discovery can
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 55.5k
- 派生
- 8.5k
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 88
描述
Summary of the new feature / enhancement
As a user, I would expect Get-Command to mirror command discovery; if I can invoke a command (e.g., uptime) then I should be able to find the command pwsh is invoking with Get-Command.
However, Get-Command uptime returns no results, despite simply calling uptime ending up finding and calling Get-Uptime.
Proposed technical implementation details (optional)
Get-Command should implement the same fallback behaviour used in command discovery; if no results are found and the command contains no verb, the Get- verb should be prepended to try to find the command in the same way command discovery normally would find the command.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Get-Command 和命令发现路径入手,比较它们各自如何处理像 uptime 这样的不带动词的名称。完成的标准是:Get-Command uptime 解析出与调用 uptime 时相同的 Get-Uptime 命令,同时现有的带动词限定的查找仍然有效。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, powershell
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 68/100