bad double quote parsing (appears to be all commands)

Open
#144 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
cli

Research direction

Start by reproducing the Windows command parsing with printf, echo, and xargs using the quoted arguments shown in the issue, then compare the output with Cygwin. The work is done when embedded double quotes are preserved consistently, including in the find | xargs sed -i use case.

Written by the indexing model from the issue text.

Description

C-bug E-help-wanted P-medium

Behold:

D:\>"c:\Program Files\coreutils\bin\printf.exe" %s-%s-%s "a""a" "a""a" "a""a"
a"a aa aa--

If I run this through cygwin the expected output appears:

D:\>"c:\cygwin64\bin\printf.exe" %s-%s-%s "a""a" "a""a" "a""a"
a"a-a"a-a"a

So far I've tried this with printf, echo, and xargs but I think all commands are affected.

What I'm trying to do: find | xargs sed -i where the replacement string contains double quote characters.

Dominant language
Rust
Stars
5.2k
Forks
107
Avg merge
2d 19h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/coreutils

All issues in microsoft/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.