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 ¶
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.
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 ¶
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.