Skip to main content

Module pty

Module pty 

Source
Expand description

Real PTY implementation using portable-pty

This module provides a true pseudo-terminal interface for interactive shell sessions, enabling proper handling of:

  • ANSI escape sequences and colors
  • Interactive programs (sudo, vim, less, etc.)
  • Terminal resize events
  • Job control signals (Ctrl+C, Ctrl+Z, etc.)

Structs§

PtyShell
Real PTY-based interactive shell

Constants§

DEFAULT_COLS
Default terminal dimensions (columns x rows)
DEFAULT_ROWS
RING_BUFFER_LINES
How many fully-formed lines to keep in the per-shell ringbuffer. Callers can ask for at most this many lines of historical context via StatusCheck.scrollback_lines.

Functions§

create_shared_pty
Create a new shared PTY shell

Type Aliases§

SharedPtyShell
Thread-safe wrapper for PtyShell