The TerminalCommand class sets up a common interface for builtin terminal commands Supports two modes:

  • Unified parser mode: When options are provided, uses command-line-args (for kernel commands)
  • Raw argv mode: When options are not provided, passes raw argv directly (for coreutils commands)
Implements
  • TerminalCommand

Constructors

Properties

command: string = ''
description: string = ''
kernel: Kernel
options: OptionDefinition[] = []
run: (pid: number, argv: string[]) => Promise<number | void>
shell: Shell
terminal: Terminal

Accessors

  • get usage(): string
  • Get formatted usage string including command description and options (only available when using unified parser)

    Returns string

  • get usageContent(): string
  • Get formatted usage content string (only available when using unified parser)

    Returns string