Skip to content

Support parsing and ignoring private ANSI codes #57

Description

@CosmicHorrorDev

Of the remaining ANSI codes present in terminal_session.gz there are also several so-called "private" ANSI sequences. Private sequences start with a CSI (Control sequence Introducer) consisting of ESC [. These are all private ANSI codes from terminal_session.gz

  1. CSI ? 2004 h
  2. CSI ? 2004 l
  3. CSI ? 1 h
  4. CSI ? 1 l

From Wikipedia: ANSI escape code | Control Sequence Introducer commands

A subset of arrangements was declared "private" so that terminal manufacturers could insert their own sequences without conflicting with the standard. Sequences containing the parameter bytes <=>? or the final bytes 0x70–0x7E (p–z{|}~) are private.

1. and 2. appear to be the popular turn on and off bracketed paste mode respectively according to the aforementioned Wikipedia article. 3. and 4. appear to be cursor key mode commands according to the info listed in this gist

I'd imagine typically there isn't anything actionable we can typically do with private ANSI codes, so we should support parsing and subsequently excluding them from the converted HTML output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions