ServerOptions
ServerOptions configures a Server without starting tmux. NewServer snapshots the effective environment, working directory, and executable; callers retain ownership of every supplied value.
Source and package
- Qualified name
-
tmux.Server Options - Package
- tmux
- Distribution
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/server_options.go
Fields9#
| Name | Type | Description |
|---|---|---|
| ConfigFile | string | ConfigFile selects an exact tmux configuration file. Empty lets tmux read its default configuration, so a program inherits whatever the user running it has configured: a base-index other than zero, a prompt that appears in captured pane text, hooks that fire on the sessions this program creates. Point it at a file the program owns, which may be an empty one, when the tmux it drives should not depend on that. |
| SocketName | string | SocketName selects tmux's named socket. SocketPath takes precedence. |
| SocketPath | string | SocketPath selects an explicit tmux socket path. |
| Binary | string | Binary is the tmux executable name or path. Empty resolves tmux once through the snapshotted PATH. Relative paths resolve against the constructor's working directory. The resolved absolute path is shared by subprocess and control-mode transports. |
| Colors | Color | Colors overrides tmux's terminal color capability. |
| CommandObserver | Command | CommandObserver receives one record per tmux command run. Nil observes nothing. See CommandObserver for delivery and concurrency semantics. |
| ProcessEnvironment | []string | ProcessEnvironment replaces the child process environment. Nil snapshots the current process environment. A non-nil empty slice supplies no caller-provided variables. Execution may add variables required by Go's target platform and a canonical TMUX_TMPDIR that freezes named or default socket selection. Duplicate names retain their last value. Entries containing NUL are rejected except on Plan 9, where NUL separates path-list elements. NewServer clones the slice. |
| Unsupported | Unsupported | Unsupported selects what happens when a request needs an optional tmux capability the running server does not have. The zero value refuses the request; see UnsupportedPolicy. |
| WarningHandler | Warning | WarningHandler receives nonfatal compatibility warnings. Nil discards warnings. See WarningHandler for delivery and concurrency semantics. |
Guides#
Pages that discuss ServerOptions.