clip

package
v0.0.0-...-39ac812 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package clip writes text to the system clipboard, for the examples that copy text selected with the mouse, given to bloom.WithClipboard. Bloom sends the text to the terminal's clipboard with OSC 52 after it.

Index

Constants

This section is empty.

Variables

View Source
var ErrWriteFailed = errors.New("the clipboard did not take the text")

ErrWriteFailed is returned when the system clipboard does not hold the text after it was written.

View Source
var Native = true

Native is whether text is written to the system clipboard at all, which tests turn off, to leave the clipboard of whoever runs them alone.

Functions

func Write

func Write(text string) error

Write writes text to the system clipboard, and reads it back to make sure it landed, as crush does: a write can fail quietly, and an earlier copy of the same text would hide that from the write alone. Where there is no system clipboard to reach, such as over SSH, or on Linux without xclip, xsel, or wl-copy, it returns nil, leaving the copy to OSC 52.

Types

This section is empty.

Jump to

Keyboard shortcuts

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