From 14b99b7d52e5e61d986ef5d0860d5da7c6161abf Mon Sep 17 00:00:00 2001 From: Nicknames96 <77236308+Nicknames96@users.noreply.github.com> Date: Sun, 1 Mar 2026 18:50:52 +0100 Subject: [PATCH] fix(clipboard): strip carriage returns from PowerShell output on WSL --- lib/clipboard.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/clipboard.zsh b/lib/clipboard.zsh index 27e81525a..6a2df1fbd 100644 --- a/lib/clipboard.zsh +++ b/lib/clipboard.zsh @@ -59,7 +59,7 @@ function detect-clipboard() { function clippaste() { cat /dev/clipboard; } elif (( $+commands[clip.exe] )) && (( $+commands[powershell.exe] )); then function clipcopy() { cat "${1:-/dev/stdin}" | clip.exe; } - function clippaste() { powershell.exe -noprofile -command Get-Clipboard; } + function clippaste() { powershell.exe -noprofile -command Get-Clipboard | tr -d '\r'; } elif [ -n "${WAYLAND_DISPLAY:-}" ] && (( ${+commands[wl-copy]} )) && (( ${+commands[wl-paste]} )); then function clipcopy() { cat "${1:-/dev/stdin}" | wl-copy &>/dev/null &|; } function clippaste() { wl-paste --no-newline; }