Documentation
¶
Index ¶
- func FormatJumpCommand(sessionName string) string
- func ITerm2SplitPane(command string) error
- func IsITerm2() bool
- func IsInsideTmux() bool
- func IsTmuxAvailable() bool
- func ResumeCmd(sessionID, workingDir string) *exec.Cmd
- func SuspendAndAttach(sessionName string) *exec.Cmd
- func TmuxAttach(sessionName string) error
- func TmuxHasSession(sessionName string) bool
- func TmuxSendKeys(sessionName, keys string) error
- type ResumeResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatJumpCommand ¶
FormatJumpCommand returns a human-readable description of the jump command.
func ITerm2SplitPane ¶
ITerm2SplitPane creates a horizontal split in the current iTerm2 session and runs the given command in the new pane.
func IsInsideTmux ¶
func IsInsideTmux() bool
IsInsideTmux returns true if we're running inside a tmux session.
func ResumeCmd ¶
ResumeCmd returns an exec.Cmd for use with tea.ExecProcess. This suspends the TUI and runs Claude directly. When the user exits Claude (/exit or Ctrl+C), the TUI resumes.
func SuspendAndAttach ¶
SuspendAndAttach returns an exec.Cmd that attaches to (or switches to) a tmux session. Suitable for use with tea.ExecProcess.
func TmuxAttach ¶
TmuxAttach attaches to a tmux session, taking over the current terminal.
func TmuxHasSession ¶
TmuxHasSession checks if a tmux session exists.
func TmuxSendKeys ¶
TmuxSendKeys sends keystrokes to a tmux session.
Types ¶
type ResumeResult ¶
type ResumeResult struct {
Method string // "tmux-pane", "iterm-pane", "exec"
Hint string // status bar hint for the user
}
ResumeResult describes what happened when we tried to open a session.
func ResumeInPane ¶
func ResumeInPane(sessionID, workingDir string) (*ResumeResult, error)
ResumeInPane opens a Claude session alongside aimux. Tries, in order:
- tmux split pane (if inside tmux)
- iTerm2 split pane (if inside iTerm2)
- Returns nil — caller should use tea.ExecProcess as fallback
Returns a ResumeResult describing what happened, or an error. If neither tmux nor iTerm2 is available, returns (nil, nil) to signal the caller should fall back to tea.ExecProcess.