PowerShell wrapper breaks some common GNU command forms
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- powershell, rust
- 領域
- cli, operating-systems
調査の方向性
まず、コミット fe33724 時点の PowerShell ラッパーのソースを使って cat -- -dash.txt、grep、cp のケースを再現し、その後、引数処理をリリースアーティファクトと比較します。ラッパーが -- というファイル名のケースを保持できるかを確認し、その他のどの GNU/POSIX 形式がシェル構文の制限に該当するかを特定します。完了条件には、検証済みの修正または明示的なラッパーのドキュメントを含める必要があります。
索引モデルが issue の本文から書いたものです。
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/coreutils のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
sleep has 9MB オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
grep not work オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
microsoft/coreutils の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TheLarkInn/aipm#2413 ·
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
todo:ticket
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
taikoxyz/taiko-mono#22168 · コメント 1 件 ·