Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add a mode to `coreutils-manager disable` that only removes the PowerShell alias

未关闭
#191 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
powershell, rust

调研方向

Start by reading the PowerShell integration page and locating the profile snippet that rewrites interactive input; the issue does not name its file or a test. Trace how command names are rewritten and how aliases such as sort resolve. Done means sort invokes Sort-Object in an object pipeline while sort.exe still invokes Coreutils.

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

描述

Version: Coreutils for Windows 2026.9.3 (installed via winget, interactive setup)
PowerShell: 7.6.7
Integration: "Install for all users"

Steps to reproduce:

  1. Install with PowerShell integration enabled.
  2. Open a new PowerShell session.
  3. Run: gci | sort

Expected:
sort resolves to the built-in alias Sort-Object and sorts the objects.
sort.exe should be the explicit way to call the Coreutils version.

Actual:
The Coreutils sort runs. The objects are converted to text, and the lines are sorted alphabetically, including the table header lines.

Image

Get-Alias sort and Get-Command sort both still show sort -> Sort-Object, so the alias is still there. It's bypassed because the snippet rewrites interactive input.

Image

The "PowerShell Integration" page in the installer says:

Coreutils needs a small profile snippet to work inside PowerShell. Without it, PowerShell mangles argument quoting and globbing, so most Coreutils commands wouldn't behave correctly. The snippet does not remove PowerShell's built-in aliases. It rewrites interactive input so names such as cat, cp, and ls resolve to the Coreutils versions.

Based on "does not remove PowerShell's built-in aliases", I expected the aliases to keep working. That's technically true, but in effect the alias can't be used from the prompt anymore. For sort in particular this breaks a very common PowerShell idiom.

Request:
Either don't rewrite names that are object-pipeline cmdlet aliases (sort at least), or provide a per-command opt-out for the rewrite. That way sort stays Sort-Object and sort.exe stays Coreutils.

主要语言
Rust
星标
5.3k
派生
110
平均合并
1 小时 26 分钟
30 天内合并 PR
3

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

microsoft/coreutils 的其他 Issue

查看 microsoft/coreutils 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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