8000
Skip to content

feat: enable native wildcard expansion for CLI on Windows - #284

Merged
hellobertrand merged 1 commit into
mainfrom
feat/windows-argv-glob
Jun 15, 2026
Merged

feat: enable native wildcard expansion for CLI on Windows#284
hellobertrand merged 1 commit into
mainfrom
feat/windows-argv-glob

Conversation

@hellobertrand
Copy link
Copy Markdown
Owner

Windows command-line shells (cmd.exe, PowerShell) do not expand wildcards like *.txt before passing them to an executable, unlike POSIX shells. This means patterns are passed literally, preventing the CLI from processing multiple files via globbing on Windows.

This commit links setargv.obj to the CLI executable when building with MSVC. This instructs the C runtime (CRT) to perform argument list globbing, allowing patterns to be expanded into individual file paths before main() is invoked.

A new test verifies that setargv.obj correctly expands quoted wildcard patterns when running on Windows, ensuring consistent behavior across platforms.

@codecov
codecov Bot commented Jun 15, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Windows command-line shells (cmd.exe, PowerShell) do not expand wildcards like `*.txt` before passing them to an executable, unlike POSIX shells. This means patterns are passed literally, preventing the CLI from processing multiple files via globbing on Windows.

This commit links `setargv.obj` to the CLI executable when building with MSVC. This instructs the C runtime (CRT) to perform argument list globbing, allowing patterns to be expanded into individual file paths before `main()` is invoked.

A new test verifies that `setargv.obj` correctly expands quoted wildcard patterns when running on Windows, ensuring consistent behavior across platforms.
@hellobertrand
hellobertrand force-pushed the feat/windows-argv-glob branch from feafd5d to a0ae94d Compare June 15, 2026 11:36
@hellobertrand hellobertrand mentioned this pull request Jun 15, 2026
@hellobertrand
hellobertrand merged commit a9c3655 into main Jun 15, 2026
71 checks passed
@hellobertrand
hellobertrand deleted the feat/windows-argv-glob branch June 15, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4BCF

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0