Raxol.Terminal.Commands.CommandServer (Raxol Terminal v2.6.0)

Copy Markdown View Source

Unified command handler that consolidates all terminal command processing.

Routes commands to specialized handler modules:

  • CommandServer.CursorOps -- cursor movement and positioning
  • CommandServer.EraseOps -- screen/line/character erase
  • CommandServer.DeviceOps -- DA/DSR device responses
  • CommandServer.ModeOps -- ANSI/DEC mode set/reset
  • CommandServer.SGROps -- SGR text formatting
  • CommandServer.BufferLineOps -- insert/delete lines with scroll regions

Summary

Functions

Processes any terminal command with unified handling.

Handles CSI (Control Sequence Introducer) commands.

Handles OSC (Operating System Command) sequences.

Types

command_params()

@type command_params() :: %{
  type: command_type(),
  command: String.t(),
  params: [integer()],
  intermediates: String.t(),
  private_markers: String.t()
}

command_result()

@type command_result() ::
  {:ok, Raxol.Terminal.Emulator.t()}
  | {:error, atom(), Raxol.Terminal.Emulator.t()}

command_type()

@type command_type() :: :csi | :osc | :dcs | :escape | :control

Functions

handle_command(emulator, cmd_params)

@spec handle_command(Raxol.Terminal.Emulator.t(), command_params()) ::
  command_result()

Processes any terminal command with unified handling.

handle_csi(emulator, command, params \\ [], intermediates \\ "")

@spec handle_csi(Raxol.Terminal.Emulator.t(), String.t(), [integer()], String.t()) ::
  command_result()

Handles CSI (Control Sequence Introducer) commands.

handle_osc(emulator, command, data)

Handles OSC (Operating System Command) sequences.