session

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TmuxRunning

func TmuxRunning() bool

TmuxRunning checks if currently running inside a tmux session

Types

type SessionManager

type SessionManager struct {
	// contains filtered or unexported fields
}

SessionManager handles tmux session lifecycle operations

func NewSessionManager

func NewSessionManager(cfg *config.Config) *SessionManager

NewSessionManager creates a new SessionManager instance

func (*SessionManager) AttachToSession

func (sm *SessionManager) AttachToSession(sessionName string) error

AttachToSession attaches to an existing tmux session

func (*SessionManager) KillSession

func (sm *SessionManager) KillSession(sessionName string) error

KillSession terminates a tmux session

func (*SessionManager) ListSessions

func (sm *SessionManager) ListSessions() error

ListSessions lists all active tmux sessions

func (*SessionManager) ResolveSession

func (sm *SessionManager) ResolveSession(dir string) error

ResolveSession creates a new session if it doesn't exist and then attaches to it

type TmuxCommand

type TmuxCommand struct {
	// contains filtered or unexported fields
}

tmuxCommand represents a command to be executed with tmux

func NewTmuxCommand

func NewTmuxCommand(args ...string) *TmuxCommand

New creates a new TmuxCommand with the given arguments

func (*TmuxCommand) Execute

func (tc *TmuxCommand) Execute() error

Execute runs the tmux command and returns any error

func (*TmuxCommand) ExecuteVerbose

func (tc *TmuxCommand) ExecuteVerbose() error

ExecuteVerbose runs the command and prints detailed output

func (*TmuxCommand) ExecuteWithIO

func (tc *TmuxCommand) ExecuteWithIO() error

ExecuteWithIO runs the tmux command with standard IO connected

func (*TmuxCommand) Output

func (tc *TmuxCommand) Output() ([]byte, error)

ExecuteOutput runs the command and returns the output

Jump to

Keyboard shortcuts

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