Not sure what has changed but unfortunately the binaries from win-clipboard are slower now, taking more than a few seconds where in the past it was much faster.
Perhaps we can use the os.release
>= '5.10.60.1-microsoft-standard-WSL2' or just WSL2
to know when to use alternative binaries since these built in's should be supported on systems with wsl2.
The equivalent to the mac utils pbpaste
in wsl/windows 10+ is:
#!/bin/bash
powershell.exe Get-Clipboard | sed 's/\r$//' | sed -z '$ s/\n$//'
We probably want to skip the sed to use the text as is.
and pbcopy
(although clip.exe could may also be used directly without requiring tee
that was more to emulate pbcopy
's I believe)
#!/bin/bash
tee <&0 | clip.exe
Unfortunately can't submit a PR for this now but if this sounds good I may try to pick this up another time.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too