Help us shape the future of Go! Take the 2026 Go Developer Survey

lclip

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2015 License: MIT Imports: 5 Imported by: 0

README

lclip

cli interface for labeled clipboard.

$ echo -e "Hello\nworld" | lclip -s hello
$ lclip -g hello
Hello
world

Usage

$ lclip <operation> [...]
operations:
	lclip {-h --help}                      # show this help message
	lclip {-v --version}                   # print the version
	lclip {-l --labels}                    # list labels
	lclip {-g --get}     <label>           # paste text from label
	lclip {-s --set}     <label> [file(s)] # copy text to label
	lclip {-d --delete}  <label(s)>        # delete label(s)

Installation

###compiled binary

See releases

###go get

go get github.com/kusabashira/lclip/cmd/lclip

Operations

-h, --help

Display a help message.

-v, --version

Display the version of lclip.

-l, --labels

List sorted labels.

-g, --get label

Paste text from label. If not exists label, paste a newline.

-s, --set label file(s)

Copy text to label. Read from file(s), or standard input, and nothing output.

-d, --delete label(s)

Delete label(s) from the storage.

Other Specification

  • Storage path is ~/.lclip.db
  • If not exist exists storage, storage will be created.

License

MIT License

Author

wara kusabashira227@gmail.com

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() (string, error)

Types

type Clipboard

type Clipboard struct {
	// contains filtered or unexported fields
}

func NewClipboard

func NewClipboard(path string) (*Clipboard, error)

func NewClipboardWithDefaultPath added in v0.2.0

func NewClipboardWithDefaultPath() (*Clipboard, error)

func (*Clipboard) Close

func (c *Clipboard) Close() error

func (*Clipboard) Delete added in v0.3.0

func (c *Clipboard) Delete(label string)

func (*Clipboard) Get

func (c *Clipboard) Get(label string) []byte

func (*Clipboard) Labels

func (c *Clipboard) Labels() []string

func (*Clipboard) Set

func (c *Clipboard) Set(label string, data []byte)

Directories

Path Synopsis
cmd
lclip command

Jump to

Keyboard shortcuts

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