Skip to content

Commit 226587c

Browse files
niklasbdocwhat
authored andcommitted
Fix for WSL 2 clip.exe
Apparently clip.exe doesn't work properly with WSL 2: It doesn't exit when EOF is reached on STDIN. This is a workaround by making sure that SIGPIPE is sent on EOF.
1 parent c32337c commit 226587c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ clipboard_copy_command() {
147147
echo "pbcopy"
148148
fi
149149
elif command_exists "clip.exe"; then # WSL clipboard command
150-
echo "clip.exe"
150+
echo "cat | clip.exe"
151151
elif command_exists "wl-copy"; then # wl-clipboard: Wayland clipboard utilities
152152
echo "wl-copy"
153153
elif command_exists "xsel"; then

0 commit comments

Comments
 (0)