Skip to content
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

Copy link to clipboard #42

Closed
boeckhoff opened this issue May 23, 2016 · 5 comments
Closed

Copy link to clipboard #42

boeckhoff opened this issue May 23, 2016 · 5 comments

Comments

@boeckhoff
Copy link

I imagine that the user wants the link copied to clipboard in most usecases

On linux, when xclip is installed the alias can be adjusted to:
"nc termbin.com 9999 | xclip -selection c"

That way the link is copied to clipboard. I do not know how this could be done on other platforms but it might be a useful hint to include on the website.

@solusipse
Copy link
Owner

Great idea, we might add this. Btw, I'm thinking of creating a new website so this may take a while. Thanks!

@datajerk
Copy link

For OS/X, it's pbcopy, e.g. echo foo | nc termbin.com 9999 | pbcopy

@sbrl
Copy link

sbrl commented Sep 28, 2016

For linux you can pipe into xclip -selection c. On my machine I have an alias for it and termbin like so:

alias termbin='netcat termbin.com 9999'
alias setclip='xclip -selection c'

So then I can do somecommand | termbin | setclip.

@solusipse
Copy link
Owner

solusipse commented Sep 2, 2017

I've added some of these commands to our Readme file. Thank you!

@Inu-Yasha
Copy link

For linux you can pipe into xclip -selection c. On my machine I have an alias for it and termbin like so:

alias termbin='netcat termbin.com 9999'
alias setclip='xclip -selection c'

So then I can do somecommand | termbin | setclip.

Nice - I actually had already previously created two scripts, xcopy.sh and xpaste.sh (I always use tab-key to auto-complete them, so I decided to leave the .sh suffix so one can see from filename that it's a shell script).
Difference in mine is that because the clipboard names (primary/selection) confuse me, I wrote my scripts so that it accepts -clipboard and -selection, where -selection really means the one where you paint a text with mouse to copy and middle-click to paste, and -clipboard means the usual copy/paste. Yeah, it also works with -c and -s. I had to recheck xclip man page too many times because I wasn't sure what I should use again ;p

Lately I also wrote scripts to copy whatever is in 'screen' pastebuffer with xcopy, or paste into the pastebuffer of screen session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants