Skip to content

Clipboard: OSC 52 only, drop xclip/wl-clipboard dependency - #653

Merged
glemsom merged 1 commit into
mainfrom
649-osc52-only-clipboard
Aug 29, 2026
Merged

Clipboard: OSC 52 only, drop xclip/wl-clipboard dependency#653
glemsom merged 1 commit into
mainfrom
649-osc52-only-clipboard

Conversation

@glemsom

@glemsom glemsom commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Closes #649

What

newClipboard now writes through OSC 52 by default (to Dependencies.OSC52Out, defaulting to stdout) instead of github.com/atotto/clipboard, which shells out to xclip/wl-clipboard/xsel. Eitri no longer assumes a host clipboard tool is present: the terminal itself is the clipboard.

The injected Dependencies.Clipboard test seam is preserved and still falls back to OSC 52 on error.

Verification

  • go build ./... passes
  • go test ./internal/tui/... passes (incl. new TestNewClipboardDefaultsToOSC52, TestNewClipboardHonorsInjectedClipboard; existing Ctrl+O, /copy, and OSC 52 fallback model tests)
  • No .go source imports atotto/clipboard anymore

Note on go.mod / go.sum

go mod tidy demotes atotto/clipboard from a direct require to // indirect: it cannot be removed entirely because upstream charm.land/bubbles/v2/textarea (the composer widget) imports it unconditionally (see source). Removing those entries would break the build. The issue's intent — Eitri's own code must not depend on a host clipboard tool — is fully met.

newClipboard now writes through the OSC 52 terminal clipboard by default
instead of the atotto/clipboard host-tool wrapper, so Ctrl+O and /copy work
without xclip or wl-clipboard installed. The injected Dependencies.Clipboard
test seam is unchanged and still falls back to OSC 52 on failure.

atotto/clipboard stays in go.mod/go.sum only as an // indirect transitive
of charm.land/bubbles/v2/textarea (the composer widget), which imports it
unconditionally; no eitri source imports it anymore.
@glemsom
glemsom merged commit af0a5b3 into main Aug 29, 2026
1 check passed
@glemsom
glemsom deleted the 649-osc52-only-clipboard branch August 29, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clipboard: OSC 52 only, drop xclip/wl-clipboard dependency

1 participant