Documentation
¶
Index ¶
- Variables
- func Cmd(args []string) (string, string, error)
- func GetDefaultSocket() (string, string)
- func InsideTmux() bool
- func IsValidPath(session string) bool
- type Server
- func (server *Server) Attach(sessionName string) (string, string, error)
- func (server *Server) CreateSession(sessionName string, sessionPath string) (*Session, error)
- func (server *Server) GetSession(sessionName string) (*Session, error)
- func (server *Server) GetSessions() ([]*Session, error)
- func (server *Server) SessionExists(sessionName string) bool
- func (server *Server) Start() (string, string, error)
- type Session
Constants ¶
This section is empty.
Variables ¶
var InitSessionName string
TODO: should define a sentinel tmux error to return from this?
Functions ¶
func GetDefaultSocket ¶
GetDefaultSocket returns default tmux socket name and path
func InsideTmux ¶
func InsideTmux() bool
InsideTmux checks if $TMUX environment var is set, meaning running inside tmux
func IsValidPath ¶
IsValidPath checks if a given session name is actually a valid path
Types ¶
type Server ¶
func GetCurrentServer ¶
GetCurrentServer retrieves the server for the current session
func (*Server) Attach ¶
Attach attaches to session in the given server. If no target session is given, tmux will pref most recently used unattached session
func (*Server) CreateSession ¶
CreateSession creates a tmux session based on name and working directory
func (*Server) GetSession ¶
GetSession retrieves a tmux session by name
func (*Server) GetSessions ¶
GetSessions retrieves all tmux sessions
func (*Server) SessionExists ¶
SessionExists checks if session exists based on its name