Skip to content

Let Lua callers select tmux from PATH - #179

Merged
tony merged 2 commits into
masterfrom
path-discovery-current
Dec 6, 2026
Merged

tony merged 2 commits into
masterfrom
path-discovery-current

Conversation

@tony

@tony tony commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A caller starting a tmux server should be able to use the executable on its PATH and still select an exact binary when needed.

connect, start_server, and with_server default to the first executable tmux on the caller’s PATH. Pass an absolute binary to select a specific build. Use runtime:find_tmux():await() to get the selected path without starting a process. If the search finds no executable, the request returns invalid_endpoint.

Test plan

  • luajit scripts/check/check.lua unit --lua .cache/toolchains/lua-5.5.1/bin/lua --nvim .cache/toolchains/nvim-0.12.5/bin/nvim
  • luajit 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.61 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/nvim

Closes #109.

tony added 2 commits December 6, 2026 08:22
why:
A caller starting a tmux server should be able to use the executable on
its PATH and still select an exact binary when needed.

what:
- Resolve the program before spawning tmux and update library callers,
  tests and examples to use the public selection rule.
why:
A caller starting a tmux server should be able to use the executable on
its PATH and still select an exact binary when needed.

what:
- Record the change under Unreleased.
@tony
tony force-pushed the path-discovery-current branch from 0eb59ce to 7651143 Compare December 6, 2026 14:22
@tony
tony merged commit 8aaf0ae into master Dec 6, 2026
13 of 14 checks passed
@tony
tony deleted the path-discovery-current branch December 6, 2026 14:32
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.

binary must be an absolute path, so every program hard-codes /usr/bin/tmux

1 participant