solusipse/fiche

Copy link to clipboard

boeckhoff opened this issue · 5 comments

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.

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

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

sbrl commented

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.

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

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.