3 ms·
Useful tool indeed, thanks for sharing. I use clipper[1], which delivers a similar function through a different implementation. What I like about that one is th
by jeduardo 6y ago
Useful tool indeed, thanks for sharing. I use clipper[1], which delivers a similar function through a different implementation. What I like about that one is that with right config you can also pipe output from remote servers back into your machine's clipboard, which is quite handy in so many situations.
[1] https://github.com/wincent/clipper https://github.com/wincent/clipper
- knazarov 6y agoThere's a better way to do it. Terminals have a special escape sequence called OSC 52, which allows you to insert into the clipboard from even remote SSH sessions. Try this: printf "\033]52;c;$(printf "%s" "blabla" | base64)\a"
- jeduardo 6y agoHey, that's quite interesting. Just tested it here with alacritty and was able to get data from a remote server into the clipboard. The downside here is that it did not seem to work immediately from inside tmux, but a quick search shows that there are ways to make it work. Also found a vim-plugin[1] that would allow it to work from inside vim as well. If I can also find a way to pipe random commands to it, it might indeed work better than clipper for my use cases. Finally, there is the added benefit of removing the need to forward the local UNIX socket over SSH, which I find to be a bit flaky. Thanks for sharing it! [1] https://github.com/ojroques/vim-oscyank https://github.com/ojroques/vim-oscyank
- mdaniel 6y agoI've found a couple of random blog posts and some user's pages laying out the OSC codes, but is there an open reference of them? I have also considered trawling through the various terminal emulator source repos in order to know which are actually implemented (since that can for sure be a different set from those which are specified)