Created
June 19, 2021 09:48
-
-
Save dln/ddec790e704a834bd5de134ce6a45e11 to your computer and use it in GitHub Desktop.
Copy to clipboard using OSC 52. Works over remote in most terminals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec echo -en "\x1b]52;c;$(base64 -w0)\x07" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also works fine as a function in your .zshrc/.bashrc:
function clip { echo -en "\x1b]52;c;$(base64 -w0)\x07" }