Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Rust API

Rust documentation

server.Server.resolved_tmux_executable

Rust
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server.rs
resolved_tmux_executable ( self ) → Option<PathBuf>
method [source]
method [source]
resolved_tmux_executable

Resolve the configured tmux executable from the captured launch context.

Bare names use the PATH captured by ServerBuilder::build . Relative paths use its captured working directory. The returned path preserves a configured wrapper or symlink rather than canonicalizing it.

Returns None when the configured executable is not on the captured PATH, so a caller can tell "tmux is missing" from "tmux failed".

Examples

// Any absolute path is resolved only if it is a runnable file, so this
// example names one POSIX guarantees rather than tmux's own location,
// which varies by platform.
let server = libtmux::Server::builder()
.tmux_executable("/bin/sh")
.build()?;
assert_eq!(
server.resolved_tmux_executable(),
Some(std::path::PathBuf::from("/bin/sh")),
);
let missing = libtmux::Server::builder()
.tmux_executable("tmux-that-is-not-installed")
.build()?;
assert_eq!(missing.resolved_tmux_executable(), None);

0 declared, 0 inherited

Esc

Type to search.