tmux

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package tmux provides an interface for a subset of tmux functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasSession

func HasSession(sid string) bool

HasSession returns true if tmux is running a session named "sid".

func KillSession

func KillSession(sid string) error

KillSession destroys a session, terminating all its child processes. If the session identifier does not belong to pmux returns an error.

func ListSessions

func ListSessions() ([]string, error)

ListSessions returns the session identifiers of the running sessions started by pmux. Valid partial results may be returned (i.e. even though the error returned is not nil, the list of session identifiers up to that point may be valid).

func NewSID

func NewSID() string

func NewSession

func NewSession(sid, name string, args ...string) error

NewSession creates a new tmux session using "name" as the name of the executable to be started, and "sid" as tmux session identifier. "sid" will be validated using the `validateSID` function, and the function will return an error if the validation does not pass. Use `NewSID` to build a valid session identifier, or validate it first manually. Note that there are no guarantees that the session will still be running after this function returns.

func Version

func Version() (string, error)

Version returns tmux version. Returns an error only if the command cannot be executed, does not check the output produced.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL