jump

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatJumpCommand

func FormatJumpCommand(sessionName string) string

FormatJumpCommand returns a human-readable description of the jump command.

func ITerm2SplitPane

func ITerm2SplitPane(command string) error

ITerm2SplitPane creates a horizontal split in the current iTerm2 session and runs the given command in the new pane.

func IsITerm2

func IsITerm2() bool

IsITerm2 returns true if the current terminal is iTerm2.

func IsInsideTmux

func IsInsideTmux() bool

IsInsideTmux returns true if we're running inside a tmux session.

func IsTmuxAvailable

func IsTmuxAvailable() bool

IsTmuxAvailable checks if tmux is installed.

func ResumeCmd

func ResumeCmd(sessionID, workingDir string) *exec.Cmd

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

func SuspendAndAttach(sessionName string) *exec.Cmd

SuspendAndAttach returns an exec.Cmd that attaches to (or switches to) a tmux session. Suitable for use with tea.ExecProcess.

func TmuxAttach

func TmuxAttach(sessionName string) error

TmuxAttach attaches to a tmux session, taking over the current terminal.

func TmuxHasSession

func TmuxHasSession(sessionName string) bool

TmuxHasSession checks if a tmux session exists.

func TmuxSendKeys

func TmuxSendKeys(sessionName, keys string) error

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:

  1. tmux split pane (if inside tmux)
  2. iTerm2 split pane (if inside iTerm2)
  3. 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.

Jump to

Keyboard shortcuts

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