feat(clipboard): fill the WSL2 clipboard gap with win32yank #161

Merged
rootiest merged 5 commits from feat/win32yank-wsl2-clipboard into main 2026-09-21 06:57:49 +00:00
Owner

Follow-up to #160: the OS-compatibility doc flagged clipboard access under WSL2 as needing a win32yank-specific path that didn't exist. This fills that gap.

Changes

  • y, p, paste, hist now fall back through wl-copy/wl-paste (Wayland) → xclip (X11) → win32yank.exe (WSL2), extracted into two shared helpers (_fish_clipboard_copy, _fish_clipboard_paste) instead of four near-duplicate chains.
    • hist previously only tried wl-copy with no fallback at all — it now gets the same X11/WSL2 coverage as the other three.
  • fish-deps can install win32yank.exe itself: a new optional-tier catalog entry, gated on WSL2 detection (microsoft in /proc/sys/kernel/osrelease) so it never surfaces on a plain Linux box's install/sync prompts — only in the informational fish-deps status listing, same as any other optional tool. Downloads the x86_64 binary from GitHub releases to ~/.local/bin/win32yank.exe; fish-deps update refreshes an existing install the same way.
  • Docs (10-installation.md, 06-dependency-catalog.md, 08-components-reference/04-c4-*.md, README) updated to match.

Verification

  • fish tests/run-tests.fish — 759/759 assertions passed
  • python3 docs/verify-manual.py — 83/84 (pre-existing, unrelated test_concat_roundtrips_original failure, confirmed present on main before this branch)
  • Manually round-tripped y/p/paste through the refactored helpers on this box (wl-copy/wl-paste path)
  • Verified the win32yank GitHub release asset layout (win32yank-x64.zip → flat win32yank.exe) against the live release before writing the installer
  • Confirmed the WSL2 gate correctly matches/skips via both a real and a simulated osrelease string, and that fish-deps install --optional stays silent about win32yank on this (non-WSL) machine
Follow-up to #160: the OS-compatibility doc flagged clipboard access under WSL2 as needing a `win32yank`-specific path that didn't exist. This fills that gap. ## Changes - **`y`, `p`, `paste`, `hist`** now fall back through `wl-copy`/`wl-paste` (Wayland) → `xclip` (X11) → `win32yank.exe` (WSL2), extracted into two shared helpers (`_fish_clipboard_copy`, `_fish_clipboard_paste`) instead of four near-duplicate chains. - `hist` previously only tried `wl-copy` with no fallback at all — it now gets the same X11/WSL2 coverage as the other three. - **`fish-deps`** can install `win32yank.exe` itself: a new optional-tier catalog entry, gated on WSL2 detection (`microsoft` in `/proc/sys/kernel/osrelease`) so it never surfaces on a plain Linux box's install/sync prompts — only in the informational `fish-deps` status listing, same as any other optional tool. Downloads the x86_64 binary from GitHub releases to `~/.local/bin/win32yank.exe`; `fish-deps update` refreshes an existing install the same way. - Docs (`10-installation.md`, `06-dependency-catalog.md`, `08-components-reference/04-c4-*.md`, README) updated to match. ## Verification - `fish tests/run-tests.fish` — 759/759 assertions passed - `python3 docs/verify-manual.py` — 83/84 (pre-existing, unrelated `test_concat_roundtrips_original` failure, confirmed present on `main` before this branch) - Manually round-tripped `y`/`p`/`paste` through the refactored helpers on this box (wl-copy/wl-paste path) - Verified the win32yank GitHub release asset layout (`win32yank-x64.zip` → flat `win32yank.exe`) against the live release before writing the installer - Confirmed the WSL2 gate correctly matches/skips via both a real and a simulated `osrelease` string, and that `fish-deps install --optional` stays silent about win32yank on this (non-WSL) machine
rootiest added 4 commits 2026-09-21 06:54:27 +00:00
y, p, paste, and hist now try win32yank.exe after wl-copy/wl-paste
and xclip, so clipboard access works under WSL2 once win32yank is
installed and reachable through WSL interop. Updates the OS
compatibility docs accordingly.
Extracts _fish_clipboard_copy and _fish_clipboard_paste so the
wl-copy/xclip/win32yank fallback chain lives in one place instead of
four near-duplicates. hist now goes through the same chain, so it
also gets the xclip (X11) fallback it was missing before, alongside
win32yank on WSL2.
New optional-tier catalog entry, gated on WSL2 detection
(/proc/sys/kernel/osrelease) so it never surfaces on a plain Linux
box's install/sync prompts, only in the informational status
listing. Downloads the x86_64 binary from GitHub releases to
~/.local/bin/win32yank.exe; fish-deps update refreshes an
already-installed copy the same way.
rootiest added the Kind/FeatureArea/FunctionsArea/Docs labels 2026-09-21 06:54:40 +00:00
rootiest added 1 commit 2026-09-21 06:55:50 +00:00
rootiest merged commit 85d13a6aaf into main 2026-09-21 06:57:49 +00:00
rootiest deleted branch feat/win32yank-wsl2-clipboard 2026-09-21 06:57:49 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rootiest/fish-config#161