Repository navigation
Show how to read a session on an existing tmux server - #183
Merged
Merged
Conversation
tony
force-pushed
the
connect-existing-session
branch
from
December 5, 2026 18:26
a83a388 to
20c428d
Compare
why: The attaching example accepts a caller’s socket, prints the existing session name and closes its connection. The Lua integration test checks that the caller’s server survives. what: - The installed-package test clears the caller’s socket setting and exercises the example’s private-server path, including cleanup after a failure.
why: The attaching guide needs a Lua example that reads an existing session and leaves the caller’s server running. what: - Record the change under Unreleased.
tony
force-pushed
the
connect-existing-session
branch
from
December 6, 2026 14:23
20c428d to
60b0252
Compare
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
Set
LIBTMUX_SOCKET_PATHto a running tmux server’s socket to read itsworksession. The example prints the session name and closes its connection. The Lua integration test checks that the caller’s server survives.Leave
LIBTMUX_SOCKET_PATHunset to run the example on its own private server. The installed-package test exercises that path, including cleanup after a failure.Test plan
luajit scripts/support/run_tests.lua scripts/docs/tests/test_api_examples.lualuajit scripts/check/check.lua integration server --lua .cache/toolchains/lua-5.5.1/bin/lua --nvim .cache/toolchains/nvim-0.12.5/bin/nvim(0.70 seconds on Linux ARM64)luajit scripts/check/check.lua docs --lua .cache/toolchains/lua-5.5.1/bin/lua --nvim .cache/toolchains/nvim-0.12.5/bin/nvimRelated to #116.