airdrop-cli icon indicating copy to clipboard operation
airdrop-cli copied to clipboard

Support for sending stdin/arbitrary strings?

Open woodruffw opened this issue 1 year ago • 3 comments

First of all, thanks for this tool! It looks very useful, and I'd love to integrate it into some of my projects.

I see that support for files and URLs are currently supported, but the underlying NSSharingService API should work with anything that implements NSPasteboardWriting, which includes things things like NSStrings.

Give that: would you be interested in support for sending arbitrary strings and/or treating - as stdin so that it could be streamed in? If so, I'm happy to try and add support for that.

woodruffw avatar Jun 03 '23 13:06 woodruffw

@woodruffw sure, that'd be great to have. Please feel free to add support for it! Just out of curiosity, what use cases do you have in mind?

vldmrkl avatar Jun 08 '23 00:06 vldmrkl

Glad to hear it! I'll poke around and try to add support tonight or tomorrow night.

Just out of curiosity, what use cases do you have in mind?

I have my own little password manager, and I'd like to be able to AirDrop passwords from my desktop to my phone and other devices: https://github.com/woodruffw/kbs2/issues/234

I'm still not 100% sure if this is the best way to accomplish that, but I'm happy to add the feature regardless :slightly_smiling_face:

woodruffw avatar Jun 08 '23 03:06 woodruffw

Hi i want to use this in zsh : find . -name ".flac" | airdrop - but I have a usage error and with airdrop - < find . -name ".flac" I have zsh: no such file or directory: find

echkourine25 avatar Aug 01 '24 12:08 echkourine25