Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

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

function LibTmux.jl latest

from_env

Module LibTmux.from_env LibTmux
Source and package
Module
LibTmux
Package
LibTmux
Source
src/server.jl

Methods#

Read the endpoint from TMUX, or select the named default socket when it is absent. Explicit selectors take precedence. Return a Server description without contacting tmux or starting a daemon.

from_env(; env=ENV, socket_path=nothing, socket_name=nothing, tmux="tmux")

See also

Server and snapshot .

Parameters
  • env = ENV #

    Mapping used to read TMUX. The value must contain a socket path, process ID, and session index separated by commas. An absent or empty value selects the named default socket; a malformed value raises ArgumentError . Explicit socket selectors bypass this lookup.

  • socket_path = nothing #

    Path to a tmux socket. When supplied, select this endpoint instead of reading env; relative paths become absolute against the current directory. Supply either socket_path or socket_name , never both. An empty path or a path containing NUL raises ArgumentError .

  • socket_name = nothing #

    Name of a tmux socket, used as tmux's -L selector. When supplied, select this endpoint instead of reading env. The name must be nonempty and contain neither a slash nor NUL. Supply either socket_name or socket_path, never both.

  • tmux = "tmux" #

    Executable name or path for later operations on the returned server. A bare name is resolved through PATH when an operation runs. This call checks that the value is a nonempty string without NUL; it does not check whether the executable or socket exists.

Discussed in Getting started

Esc

Type to search.

Reference preview Open reference