Skip to content

feat: syntax-highlighted BASIC output in the terminal #20

@acscpt

Description

@acscpt

Add ANSI colour syntax highlighting to BBC BASIC output, making program listings easier to read at a glance.

Use case

Detokenized BASIC output is monochrome plain text. Long programs are hard to scan visually - keywords, strings, comments, and line numbers all look the same. Colour highlighting is the single biggest readability improvement for terminal output.

Proposed behaviour

beebtools extract mydisc.ssd T.MYPROG --colour
beebtools search mydisc.ssd "PRINT" --colour

Keywords, line numbers, string literals, REM tails, and numeric literals are displayed in distinct colours. Highlighting is disabled automatically when stdout is not a TTY (piped or redirected output stays plain). search highlights the matched text in results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogFor future considerationbasicBBC BASIC relatedcliCommand-line interfaceenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions