findutils find broken in Powershell when more than one file matches

Open
#122 1 comment 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
powershell, rust

Research direction

Start by reproducing find . -name '*.md' in PowerShell with multiple matching files, then compare the argument handling with ComSpec cmd.exe. Trace the find command's Windows argument parsing and verify that multiple glob matches are accepted in PowerShell while the shown cmd.exe behavior remains working.

Written by the indexing model from the issue text.

Description

suppose a directory with two or more files matching a glob pattern. Say files "one.md" and "two.md".
The "find" command breaks with any glob pattern matching more than one file in Powershell.

find . -name '*.md'
# or
find . -name "*.md"

find: Unrecognized flag: 'one.md'

This does work from ComSpec cmd.exe with double quotes only:

find . -name "*.md"
.\one.md
.\two.md
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.