Closed MuXiu1997 closed 7 months ago
I've been using this solution for several years now and it works as I expected. However, whenever a new version comes out, I need to modify the plugin code again, which is why I considered submitting a PR. If you think this solution is not what you want, feel free to close this PR.
Hi @MuXiu1997
Currently, I'm considering this PR, if you have any further concern, please let me know.
Thanks & Regards
This is a simple and common implementation for integrating with the clipboard, allowing users to define the
ZVM_CLIP_COPY
andZVM_CLIP_PASTE
environment variables to determine what command to use for clipboard integration.Essentially, it assigns the result of executing
ZVM_CLIP_PASTE
to theCUTBUFFER
variable before reading theCUTBUFFER
function, and sends theCUTBUFFER
through a pipeline toZVM_CLIP_COPY
after writing theCUTBUFFER
function. It is also very easy to use with https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh.