Skip to content

Add Windows-native which command - #59

Open
曹梦轩 (caomengxuan666) wants to merge 1 commit into
microsoft:mainfrom
caomengxuan666:winuxcmd/which
Open

Add Windows-native which command#59
曹梦轩 (caomengxuan666) wants to merge 1 commit into
microsoft:mainfrom
caomengxuan666:winuxcmd/which

Conversation

@caomengxuan666

@caomengxuan666 曹梦轩 (caomengxuan666) commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Adds a small Windows-native which implementation.

It searches PATH, respects PATHEXT on Windows, supports -a/--all, and returns a non-zero exit code when any requested command is not found.

This came out of the scope discussion in #56: which is common on Unix/macOS and fills a small PowerShell gap without needing a POSIX layer.

Validation:

  • cargo test -p uu_which
  • cargo check
  • target\debug\coreutils.exe which powershell

Closes #154

@lhecker Leonard Hecker (lhecker) added the C-feature Feature requests and any other major tasks. label Jun 9, 2026

@IDisposable Marc Brooks (IDisposable) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-feature Feature requests and any other major tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add which

3 participants