redpaste

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

README

license ![download](https://badges.fyi/static/download/on GoBuilder.me)

Luzifer / redpaste

redpaste is a small utility to improve my work with a remote server I'm working on permanentely. On the remote server I'm working with a tmux session all the time but quite often I need to copy something from my terminal and paste it to the browser.

As long as it's just a few lines its fine to just resize the pane (ctrl+b, z) and then mark it, copy it using the copy function of my system and paste it to the browser. But sometimes there are several hundres of lines to copy. Now the fuckup begins: Scrolling in tmux buffer, selecting a part of the whole, copy it, scroll again, select another part, repeat...

To work around this I got me redpaste which just takes stuff from stdin and stores it to a Redis server. On my local computer I can fetch the data to the clipboard and paste it at once.

Usage

  • Use redpaste --create-config to write a default configuration
  • Set your redis connect string inside the configuration
    (Format: tcp://auth:<password>@<your machine>:6379/0)
  • To test everything just echo "hi" | redpaste set and redpaste get, this should work as expected
Use for tmux copying

Add this sniplet to your .tmux.conf:

bind C-y run "tmux save-buffer - | redpaste set"
  • Enter selection mode: ctrl+b, [
  • Move to the part your want to copy, start selecting: v
  • Select everything you need to copy and copy the selection to the buffer: y
  • Execute the sniplet above: ctrl+b, ctrl+y
Use to fetch the data to your local clipbpard (OSX)

Just execute this command:

redpaste get | pbcopy

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL