Clipboard: OSC 52 only, drop xclip/wl-clipboard dependency - #653
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #649
What
newClipboardnow writes through OSC 52 by default (toDependencies.OSC52Out, defaulting to stdout) instead ofgithub.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.Clipboardtest seam is preserved and still falls back to OSC 52 on error.Verification
go build ./...passesgo test ./internal/tui/...passes (incl. newTestNewClipboardDefaultsToOSC52,TestNewClipboardHonorsInjectedClipboard; existing Ctrl+O,/copy, and OSC 52 fallback model tests).gosource importsatotto/clipboardanymoreNote on go.mod / go.sum
go mod tidydemotesatotto/clipboardfrom a direct require to// indirect: it cannot be removed entirely because upstreamcharm.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.