Skip to content

VS Code Terminals

Robert Brisita edited this page Mar 1, 2022 · 4 revisions

Certain POSIX Shell operations are recorded on terminals created through the Codio Side Bar. Valid operations are file and directory manipulation commands under the workspace path.

Terminology

  • Operation - A collection of commands with either logical ANDs (&&) or ORs (||), pipes (|), or output redirection (>, &>, 2>1, >>).
  • Command - A single valid command that can be executed on the Command Line Interpreter (CLI).
  • Elements - The parts that make up a command: subcommands, arguments, short options (-o), and long options (--option)

Events

  • Activate
  • Change
  • Close
  • Create
  • Open

Recorder Responsibilities

  • Close any open terminals.
  • Record create event to create (from UI Side Bar) and show terminal.
  • Using history file, record allowed operations.
  • Guard against path traversal outside of workspace by finding and resolving possible paths.
  • Clean up storage used.

Player Responsibilities

  • Close any open terminals.
  • Process events of terminal manipulation
    • Convert paths to absolute paths and guard against path traversal outside of workspace.
    • Only process allowed commands.

Forward

  • Aggregate terminal commands to execute as a POSIX Shell command.
  • Create storage file to communicate execution is done.
  • Clean up storage used.
Clone this wiki locally