I want to automate file sharing via the system Share Menu
and it would be very helpful to know how to do it from command line,
- Activate Share Menu:
and a Share Menu appears on screen and let me choose which where to share the file to.
- Directly share to an app:
share-with-share-menu /path/to/file --handler-id com.apple.mail
This opens up Mail.app (com.apple.mail) and compose a new email with the file attached.