Repository navigation
Client(feat): Request a terminal clipboard - #889
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #889 +/- ##
==========================================
+ Coverage 58.01% 58.41% +0.39%
==========================================
Files 29 30 +1
Lines 4416 4470 +54
Branches 895 900 +5
==========================================
+ Hits 2562 2611 +49
- Misses 1543 1548 +5
Partials 311 311 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tony
added a commit
that referenced
this pull request
Nov 21, 2026
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
tony
added a commit
that referenced
this pull request
Nov 22, 2026
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
tony
force-pushed
the
feat/client-clipboard-request
branch
from
November 22, 2026 00:25
9c159a5 to
5ff1f71
Compare
tony
added a commit
that referenced
this pull request
Nov 22, 2026
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
tony
force-pushed
the
feat/client-clipboard-request
branch
from
November 22, 2026 13:19
5ff1f71 to
1400a06
Compare
tony
added a commit
that referenced
this pull request
Nov 22, 2026
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
tony
force-pushed
the
feat/client-clipboard-request
branch
from
November 22, 2026 14:54
1400a06 to
342774b
Compare
tony
added a commit
that referenced
this pull request
Nov 22, 2026
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
tony
force-pushed
the
feat/client-clipboard-request
branch
from
November 22, 2026 19:27
342774b to
06f52c4
Compare
tony
added a commit
that referenced
this pull request
Nov 25, 2026
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
tony
force-pushed
the
feat/client-clipboard-request
branch
from
November 25, 2026 08:13
06f52c4 to
a67455b
Compare
tony
added a commit
that referenced
this pull request
Nov 28, 2026
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
tony
force-pushed
the
feat/client-clipboard-request
branch
from
November 28, 2026 12:49
a67455b to
fc63fbd
Compare
tony
added a commit
that referenced
this pull request
Nov 28, 2026
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
tony
force-pushed
the
feat/client-clipboard-request
branch
from
November 28, 2026 13:27
fc63fbd to
db67b18
Compare
why: Callers can select an attached terminal and ask tmux 3.6a for its clipboard. The classic server option starts sending requests at 3.7. what: - Target the selected client and check its daemon in the same command. - Return when tmux accepts the request and surface command errors. - Exercise terminal selection and delayed replies with two attached terminals and verify the classic warning boundary.
why: A tty name can be assigned to a new terminal after detachment. what: - Explain when tmux resolves the clipboard request's target. - Describe the error when no client has that name.
why: Callers need the minimum tmux release and the point at which clipboard data becomes available. what: - Document the selected client, the asynchronous reply and PR #889.
why: A vendor build can report a label without a tmux release number. The terminal test must exercise the refusal path on that build. what: - Check release strings and their expected results in one tmux command. - Exercise the selected terminal on the connected daemon's branch.
tony
force-pushed
the
feat/client-clipboard-request
branch
from
November 28, 2026 22:11
db67b18 to
0711bbd
Compare
This was referenced Nov 28, 2026
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.
Summary
Client.request_clipboard()for a selected terminal on tmux3.6aand later.Server.refresh_client(request_clipboard=True)and its tmux3.7warning floor.attached_terminal()intotests/terminal.pyfor client and popup PTY tests.Changes by area
Client and server API
src/libtmux/client.py: add_CLIPBOARD_GATEandClient.request_clipboard()to check the connected daemon's#{version}and runrefresh-client -t <client_name> -l.src/libtmux/server.py: pointServer.refresh_client()callers needing3.6aper-client clipboard queries toClient.request_clipboard().Documentation and changelog
docs/topics/clients.md: documentClient.request_clipboard(), tty target lifetime after detachment, the3.6adaemon floor, and asynchronous OSC 52 paste-buffer creation.CHANGES: add theRequest a terminal clipboard (#889)deliverable under### What's new.Tests
tests/terminal.py: add the sharedattached_terminal()PTY client context manager with optional output draining.tests/test_client.py: cover_CLIPBOARD_GATEversion matching, selected-terminal OSC 52 round trips, older-daemon refusal, detached clients, and missingclient_name.tests/test_pane.py,tests/test_server.py: reuseattached_terminal(..., drain_output=True)for popup tests and verify<3.7warning versus>=3.7-lemission onServer.refresh_client().Design decisions
Client.request_clipboard()on the connected daemon's#{version}insideif-shell -Frather thanhas_gte_version("3.6a")orcapability_since()from Capabilities(feat): Gate tmux features from one table #887:get_version()strips patch letters (comparing3.6equal to3.6a), client and daemon releases can differ, and sendingrefresh-client -lto a3.2adaemon terminates the server (server exited unexpectedly).3.6aclipboard-queryfloor fromlibtmux-tsonClient.request_clipboard()while keepingServer.refresh_client(request_clipboard=True)at its existing3.7warning floor.Existing
Server.refresh_client()display refresh (3.7floor; warns and refreshes display on3.6a):Direct per-client clipboard request (
3.6afloor; raisesVersionTooLowon older daemons before sending-l, and creates a paste buffer asynchronously when the terminal answers OSC 52):Test plan
VersionTooLowrefusal through tmux3.6and clipboard round trips across3.6a,3.7,3.7a,3.7b,3.8a, andnext-3.93.8aclient against3.2adaemon and3.6client against3.8adaemon)Client.request_clipboard()raisesValueErrorwithoutclient_nameandLibTmuxExceptionafter detachmentServer.refresh_client(request_clipboard=True)warns and omits-lbelow3.7and passes-lfrom3.7uv run pytest,uv run ruff check .,uv run mypy, andjust build-docspass