Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#191 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
powershell, rust
Lĩnh vực
cli, developer-experience

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
5.3k
Fork
110
Merge trung bình
1 giờ 26 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/coreutils

Tất cả issue của microsoft/coreutils

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.