Would it be possible, in one way or another, to from within msys2 modify the Windows clipboard in the same way xclip and xsel can do?
I'm unsure about what xclip nor xsel, but I usually simply do:
$ echo 'Wow, clipboarded!' > /dev/clipboard
$ cat /dev/clipboard
Wow, clipboarded!
# Copy something in Windows uisng Ctrl+C
$ cat /dev/clipboard
# Copied content here
Note: Don't copy the cat /dev/clipboard line, type it directly instead. Otherwise, you will have overwritten clipboard content and you would end up with this:
$ cat /dev/clipboard
cat /dev/clipboard
Don't make same mistake I made :D
The special /dev/clipboard is like any input/ouput device, so you can pipe it to make some nice stuff like cat /dev/clipboard | jq '.users[0]'.
Maybe it's enough for your use case.
Oh yeah; I love you! Suddenly my life became that much easier! Cheers man!
Glad I could make someone happy and hope it will help others :D
Regards,
Matt
Most helpful comment
I'm unsure about what
xclipnorxsel, but I usually simply do:Note: Don't copy the
cat /dev/clipboardline, type it directly instead. Otherwise, you will have overwritten clipboard content and you would end up with this:Don't make same mistake I made :D
The special
/dev/clipboardis like any input/ouput device, so you can pipe it to make some nice stuff likecat /dev/clipboard | jq '.users[0]'.Maybe it's enough for your use case.