Open rpls opened 2 years ago
Some questions:
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
:exclamation: No coverage uploaded for pull request base (
master@166d434
). Click here to learn what that means. The diff coverage is0.00%
.:exclamation: Current head e9bed58 differs from pull request most recent head f5eb431. Consider uploading reports for the commit f5eb431 to get more accurate results
@@ Coverage Diff @@
## master #134 +/- ##
=========================================
Coverage ? 63.23%
=========================================
Files ? 12
Lines ? 1934
Branches ? 0
=========================================
Hits ? 1223
Misses ? 711
Partials ? 0
Impacted Files | Coverage Δ | |
---|---|---|
src/bin/main.rs | 0.00% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 166d434...f5eb431. Read the comment docs.
Since when do we have a code coverage bot?! :D
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
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.
generate-code) wormhole send --code=$code wormhole recieve $code
if you do that you can use anything as a code that starts with a number like this:
code=$((RANDOM%1024))-$(head -c 16 /dev/urandom | xxd -ps)
xclip $code
wormhole send --code=$code
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.