PowerShell wrapper breaks some common GNU command forms
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- powershell, rust
- Ambito
- cli, operating-systems
Direzione di ricerca
Inizia riproducendo i casi cat -- -dash.txt, grep e cp con il codice sorgente del wrapper PowerShell al commit fe33724, quindi confronta la sua gestione degli argomenti con l’artefatto della release. Verifica se il wrapper può preservare il caso del nome file -- e identifica quali altre forme GNU/POSIX sono limitazioni della sintassi della shell; il lavoro deve includere un fix verificato o una documentazione esplicita del wrapper.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Rust
- Stelle
- 5.2k
- Fork
- 109
- Merge medio
- 1g 16h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/coreutils
-
Add support for /dev/nullAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
-
sleep has 9MBAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tutte le issue di microsoft/coreutils
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
install: root SSH tmpfiles.d drop-in is labeled etc_runtime_t instead of etc_tForse già presa @andrewdunndev l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
[Misdetection] `text/tab-separated-values` file misdetected as `text/tsv`Forse già presa @bact l’ha presa oggi. Apertamisdetection needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
C-bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni