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

workspace.Workspace

API reference · Markdown

struct workspace.Workspace
struct [source]
struct [source]
struct workspace.Workspace

Workspace is one tmuxp-style session description.

Discussed in Go workspace builder API

In other ports Describe a workspace as data

Members

InitialSessionRequest

InitialSessionRequest ( ) → (tmux.NewSessionRequest, error)
method [source]
method [source]
InitialSessionRequest

InitialSessionRequest validates w and returns the request that creates its session and initial window. Use the resulting materialized session with BuildInto to continue the build over a caller-owned transport.

Discussed in Use the Go workspace builder , Go workspace builder behavior , Go workspace builder API

SessionName

SessionName : string
attribute [source]
attribute [source]
SessionName

SessionName names the created session. It is required.

StartDirectory

StartDirectory : string
attribute [source]
attribute [source]
StartDirectory

StartDirectory is the default working directory for every window and pane that does not set its own.

Environment

Environment : map[string]string
attribute [source]
attribute [source]
Environment

Environment is written to the session after its initial pane exists and before later windows are created.

Options

Options : map[string]string
attribute [source]
attribute [source]
Options

Options are applied after session creation. tmux resolves window-option names against the session's current window.

GlobalOptions

GlobalOptions : map[string]string
attribute [source]
attribute [source]
GlobalOptions

GlobalOptions are applied after the initial window exists and before later windows are created.

CommandsBefore

CommandsBefore : []Command
attribute [source]
attribute [source]
CommandsBefore

CommandsBefore run in every pane before that pane's own commands. Window and pane entries add to this list rather than replacing it.

SuppressHistory

SuppressHistory : Bool
attribute [source]
attribute [source]
SuppressHistory

SuppressHistory prefixes commands with a space unless a window or pane overrides it.

Windows

Windows : []Window
attribute [source]
attribute [source]
Windows

Windows are created in order. A workspace needs at least one.

UnmarshalYAML

UnmarshalYAML ( node : *yaml.Node ) → error
method [source]
method [source]
UnmarshalYAML

UnmarshalYAML decodes the workspace, then its shell_command_before, which accepts one command or a list.

Validate

Validate ( ) → error
method [source]
method [source]
Validate

Validate reports all problems joined under ErrInvalidWorkspace .

MissingDirectories

MissingDirectories ( ) → []string
method [source]
method [source]
MissingDirectories

MissingDirectories returns absent start directories in document order. It is separate from Workspace.Validate because a prior command may create them. tmux otherwise falls back to the user's home directory without an error. Names beginning with ~ are resolved as tmux resolves them.

Discussed in Workspace files and directories , Go workspace builder behavior , Go workspace builder API

Esc

Type to search.