# source into your bash (e.g .bashrc) function osc52 { printf "\033]52;c;$(cat $* | base64)\a" echo "Copied to clipboard" }