feat(clipboard): add win32yank fallback for WSL2

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.
This commit is contained in:
2026-09-21 02:44:12 -04:00
parent 2686415db5
commit 07613c7889
6 changed files with 32 additions and 18 deletions
+5 -3
View File
@@ -8,8 +8,8 @@
# paste [args...]
#
# DESCRIPTION
# Outputs clipboard contents to stdout. Uses wl-paste on Wayland,
# falls back to xclip on X11.
# Outputs clipboard contents to stdout. Uses wl-paste on Wayland, xclip on
# X11, or win32yank on WSL2.
#
# ARGUMENTS
# args... Arguments forwarded to the clipboard tool
@@ -28,8 +28,10 @@ function paste --description 'Paste from clipboard'
wl-paste $argv
else if type -q xclip
xclip -selection clipboard -o $argv
else if type -q win32yank.exe
win32yank.exe -o --lf $argv
else
echo "Error: Neither wl-paste nor xclip found." >&2
echo "Error: No clipboard provider (wl-paste, xclip, or win32yank) found." >&2
return 1
end
end