shell

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package shell provides commands for shell state detection and prompt tracking in iTerm2 sessions using Shell Integration features.

The shell package includes subcommands for:

  • state: Check if shell is ready for input (ready/busy/tui/unknown)
  • wait-for-prompt: Block until shell prompt appears

Shell state detection works best with Shell Integration enabled in iTerm2, which provides accurate EDITING/RUNNING/FINISHED state tracking. When Shell Integration is unavailable, the package falls back to variable-based detection using session.showingAlternateScreen to detect TUI mode.

These commands enable reliable automation timing by allowing scripts to wait for command completion before sending the next command, solving common race conditions in terminal automation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() *cobra.Command

NewCommand creates the shell command with all subcommands.

Types

This section is empty.

Jump to

Keyboard shortcuts

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