-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to pipe code to an external process #134
base: master
Are you sure you want to change the base?
Conversation
Some questions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. It's a worth while feature to have right now, but be aware that clipboard support might make it obsolete one day.
Should the command line flag be renamed?
Yes, see my review comment.
Should this use an asynchronous version of std::process (adds external dependency async-process)?
To be honest, not sure. I think we can always change it to async
if the need ever comes up.
I just got an idea for a different approach to the problem that I'd like to discuss: how about having a command that generates a code? Example usage: code=$(wormhole generate-code)
wormhole send --code=$code
wormhole recieve $code code=$(wormhole generate-code)
xclip $code
wormhole send --code=$code |
This comment has been minimized.
This comment has been minimized.
Since when do we have a code coverage bot?! :D |
That would work too I guess. And users could probably have a shell alias or function in their profile to have this in one go. |
I worked in all the suggestions, but the windows support is untested. |
if you do that you can use anything as a code that starts with a number like this:
|
I just made #141. Please give it a try. Do we still need your proposed solution for some use cases? Are those use cases worth supporting? |
This adds a command line flag
--command
for thesend{,-many}
commands that allows a user to specify a shell command to which the code-word is piped. This could, for example, enable a user to pipe the command toxclip
to achieve #123. This is more versatile as this would allow a user to script some things, and probably a lot simpler than supporting clipboards in general.It's just a crude first try, I'm not a rust programmer. But it works for me.