feat(windows): add Windows binaries and fix completion support - #472
Merged
Conversation
Add Windows build targets (x86_64 and ARM64) to the release workflow and fix shell invocation to use cmd.exe on Windows instead of sh. This change addresses two GitHub issues: - #470: Windows binaries missing from releases - #471: complete-word not working on Windows Changes: - Add x86_64-pc-windows-msvc and aarch64-pc-windows-msvc build targets to publish-cli.yml workflow - Update lib/src/sh.rs to use platform-specific shell invocation: - Unix: sh -c (existing behavior) - Windows: cmd /c (new) Windows binaries will now be automatically built and published as .zip archives in GitHub releases, and completions will work properly on Windows using cmd.exe. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive Windows support by enabling pre-built Windows binaries in releases and fixing shell completions to work on Windows.
Changes:
- Added Windows build targets (x86_64 and ARM64) to the GitHub Actions release workflow
- Updated shell invocation to use platform-specific commands (
cmd /con Windows,sh -con Unix)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/publish-cli.yml |
Adds x86_64 and ARM64 Windows build targets to release workflow |
lib/src/sh.rs |
Implements conditional compilation for platform-specific shell invocation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #472 +/- ##
==========================================
- Coverage 70.73% 70.57% -0.16%
==========================================
Files 47 47
Lines 6591 6597 +6
Branches 6591 6597 +6
==========================================
- Hits 4662 4656 -6
- Misses 1259 1264 +5
- Partials 670 677 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merged
jdx
pushed a commit
that referenced
this pull request
Jan 29, 2026
### 🚀 Features - **(windows)** add Windows binaries and fix completion support by [@jdx](https://github.com/jdx) in [#472](#472)
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Feb 2, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [usage](https://github.com/jdx/usage) | minor | `2.15.1` → `2.16.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>jdx/usage (usage)</summary> ### [`v2.16.1`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#2161---2026-01-31) [Compare Source](jdx/usage@v2.16.0...v2.16.1) ##### 🐛 Bug Fixes - **(docs)** increase gap between feature grid and action buttons on landing page by [@​jdx](https://github.com/jdx) in [#​482](jdx/usage#482) - **(parse)** handle variadic ellipsis inside brackets like \[args...] by [@​jdx](https://github.com/jdx) in [#​481](jdx/usage#481) ##### 📚 Documentation - add bash array pattern for variadic args by [@​jdx](https://github.com/jdx) in [#​480](jdx/usage#480) ##### 📦️ Dependency Updates - update rust crate clap to v4.5.56 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​474](jdx/usage#474) - update apple-actions/import-codesign-certs action to v6 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​477](jdx/usage#477) - update dependency node to v24 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​478](jdx/usage#478) - update rust crate criterion to 0.8 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​475](jdx/usage#475) ### [`v2.16.0`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#2160---2026-01-29) [Compare Source](jdx/usage@v2.15.1...v2.16.0) ##### 🚀 Features - **(windows)** add Windows binaries and fix completion support by [@​jdx](https://github.com/jdx) in [#​472](jdx/usage#472) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45NC42IiwidXBkYXRlZEluVmVyIjoiNDIuOTUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive Windows support to usage by:
complete-wordnot working on windows #471)Changes
1. Windows Binary Distribution
Added two Windows build targets to
.github/workflows/publish-cli.yml:x86_64-pc-windows-msvc- 64-bit Intel/AMD Windows with MSVC toolchainaarch64-pc-windows-msvc- ARM64 Windows (Surface Pro X, etc.) with MSVC toolchainBoth targets:
windows-latestGitHub runners for native compilationcargoas the build tool (not cross).ziparchives automatically viataiki-e/upload-rust-binary-actionThis follows the proven pattern from hk, pitchfork, and fnox repositories.
2. Cross-Platform Shell Invocation
Updated
lib/src/sh.rsto use platform-specific shell commands:sh -c(existing behavior, unchanged)cmd /c(new, fixes completions)Used conditional compilation (
#[cfg(unix)]and#[cfg(windows)]) for clean separation.Why
cmd.exeand not PowerShell?Testing
✅ All tests pass on Linux (GitHub Actions will verify Windows builds)
✅ Cargo build successful
✅ No breaking changes to existing Unix behavior
Impact
After merging and the next release:
complete-wordnot working on windows #471Release Notes
Windows support! This release adds:
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
Note
Medium Risk
Moderate risk because it changes the release pipeline matrix to produce Windows artifacts and alters how scripts are executed on Windows, which could affect packaging/command behavior there.
Overview
Adds native Windows builds to the release workflow by extending
publish-cli.ymlto compile and uploadx86_64-pc-windows-msvcandaarch64-pc-windows-msvcartifacts usingcargoonwindows-latestrunners.Updates
lib/src/sh.rsto invoke the platform-appropriate shell (sh -con Unix,cmd /con Windows) and adjusts error messages accordingly, improving Windows compatibility for any features that run shell scripts (e.g., completion generation).Written by Cursor Bugbot for commit 2d61309. This will update automatically on new commits. Configure here.