clipboard

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package clipboard copies text to the system clipboard.

It tries the platform's clipboard tool first and falls back to an OSC 52 escape sequence, which is what makes copying work over SSH and inside tmux -- the case where reaching for a request you made on a remote box matters most.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("no clipboard available")

ErrUnavailable is returned when no clipboard mechanism could be used.

Functions

func Copy

func Copy(text string) (string, error)

Copy places text on the clipboard, reporting which mechanism succeeded so the UI can say "copied" honestly rather than optimistically.

Types

This section is empty.

Jump to

Keyboard shortcuts

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