tmux

package
v0.0.0-...-b43479a Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package tmux lists and creates tmux sessions on the machine Eta runs on. Eta only ever asks tmux about itself; attaching happens by running tmux inside a normal Eta terminal.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("tmux is not installed")

ErrUnavailable means tmux is not installed here. It is deliberately distinct from "no sessions": a machine that cannot run tmux should say so rather than appear to have an empty list.

Functions

func AttachArgv

func AttachArgv(name string) ([]string, error)

AttachArgv is the command a terminal runs to land inside a session. new-session -A attaches if it exists and creates it otherwise, so a session that disappeared between listing and opening does not leave the user staring at an error.

func ValidName

func ValidName(name string) bool

Types

type Session

type Session struct {
	Name     string    `json:"name"`
	Windows  int       `json:"windows"`
	Attached bool      `json:"attached"`
	Created  time.Time `json:"created"`
}

func Create

func Create(ctx context.Context, name string) (Session, error)

Create makes a detached session so the list is useful before anyone attaches to it.

func List

func List(ctx context.Context) ([]Session, error)

Jump to

Keyboard shortcuts

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