Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

PowerShell wrapper breaks some common GNU command forms

オープン
#23 コメント 3 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
powershell, rust

調査の方向性

まず、コミット fe33724 時点の PowerShell ラッパーのソースを使って cat -- -dash.txt、grep、cp のケースを再現し、その後、引数処理をリリースアーティファクトと比較します。ラッパーが -- というファイル名のケースを保持できるかを確認し、その他のどの GNU/POSIX 形式がシェル構文の制限に該当するかを特定します。完了条件には、検証済みの修正または明示的なラッパーのドキュメントを含める必要があります。

索引モデルが issue の本文から書いたものです。

説明

C-bug P-backlog

With the PowerShell wrapper enabled, I still hit a few GNU command lines that behave in surprising ways.

The clearest one is a filename starting with -:

Set-Content -LiteralPath '-dash.txt' -Value 'dash file foo'
cat -- -dash.txt

Expected:

dash file foo

Actual:

cat.cmd: '-dash': The system cannot find the file specified.
cat: .txt: The system cannot find the file specified.

It looks like -dash.txt is getting split into -dash and .txt. The same shape also fails for me with:

grep foo -- -dash.txt
cp -- -dash.txt dash-copy.txt

This workaround does work:

cat -- .\-dash.txt
grep foo -- .\-dash.txt
cp -- .\-dash.txt dash-copy.txt

I also ran into a few common GNU/POSIX forms that do not survive the wrapper:

find . \( -name "*.txt" -o -name "*.log" \) -print
find . -name "*.txt" -exec grep foo {} \;
[ -f a.txt ]
cat space\ name.txt
ls \[ab\].txt

Some of these are clearly PowerShell-vs-POSIX-shell syntax issues, so I am not claiming they are all coreutils bugs. But they are common command lines from GNU docs / muscle memory, and they are exactly the kind of cases users will try when using this project.

It would be useful either to handle the cases that can be handled, or to document the boundary of the PowerShell wrapper more explicitly. The -- -dash.txt case in particular looks like an argument-passing bug rather than just a POSIX shell compatibility limitation.

Environment:

  • Windows 10.0.26200
  • PowerShell 7.5.5
  • Wrapper source tested from commit fe33724
  • Release artifact tested: coreutils-2026.5.29-x64.exe
  • SHA256: 23B019D0664F1F5AA2A0C503435F8B52D3C8EEA2AEC1C0609CE21FCE18667281
主要言語
Rust
スター
5.2k
フォーク
107
平均マージ
2日 19時間
マージ済み PR(30日)
4

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/coreutils のほかの issue

microsoft/coreutils の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。