I did not write this, got it from here: http://stchaz.free.fr/mouse.zsh
Because there seems to be no explicit copyright notice in that file I already contacted the author to get permission to release it under some permissive MIT/BSD like license, waiting for a reply right now.
Add mouse tracking and X11 clipboard sync plugin.
Many OMZ users are on Mac, and this fails to take Mac users into consideration (pbcopy/pbaste).
Most people don't know that it's possible to copy and paste using built-in shell keybindings.
Who needs and how would one use mouse support?
@sorin-ionescu Well I'm not on a mac, neither is the author of the extension. Also the title explicitly says "X11 mouse tracking/clipboard sync". If anyone wants to use this on a Mac then they can just add support for it and send a pull request.
It's a plugin.. the people that don't know about C-k, C-y, C-w don't have to enable it if they're not going to use it.
Once you enable the plugin you can use the mouse to position the cursor in the ZSH prompt. Read the source for details there's rather comprehensive commentary in there.
Author added License notice
I've tried it. It puts the cursor in the wrong place, way to the left of where I click. It seems quite buggy.