Skip to content

spectreconsole/terminal

Repository files navigation

Spectre.Terminals

A terminal abstraction with platform specific drivers.

Disclaimer

This is a work in progress, and usage is not yet recommended.
Things will change, move around and break.

Acknowledgement

Inspired by system-terminal written by Alex Rønne Petersen.

Features

  • Windows

    • STDIN
      • Read Key
      • Read Single Character (if raw mode is enabled)
      • Read Line
      • Get encoding
      • Set encoding
      • Redirect to custom reader
      • Is handle redirected?
    • STDOUT/STDERR
      • Write
      • Get encoding
      • Set encoding
      • Redirect to custom writer
      • Is handle redirected?
    • Raw mode (enable/disable)
    • Signals
      • SIGINT (CTRL+C)
      • SIGQUIT (CTRL+BREAK)
    • Window
      • Get width
      • Get height
    • VT/ANSI emulation (Windows only)
      • CUU (Cursor up)
      • CUD (Cursor down)
      • CUF (Cursor forward)
      • CUB (Cursor back)
      • CNL (Cursor next line)
      • CPL (Cursor previous line)
      • CHA (Cursor horizontal absolute)
      • CUP (Cursor position)
      • ED (Erase in display)
      • EL (Erase in line)
      • SGR (Selection graphic rendition)
      • SCP (Save current cursor position)
      • RCP (Restore saved cursor position)
      • DECTCEM 25 (Hide cursor)
      • DECTCEM 25 (Show cursor)
      • DECSET 1049 (Enable alternative buffer)
      • DECSET 1049 (Disable alternative buffer)
  • Linux

    • STDIN
      • Read Key
      • Read Single Character
      • Read Line
      • Get encoding
      • Set encoding (NOT SUPPORTED)
      • Redirect to custom reader
      • Is handle redirected?
    • STDOUT/STDERR
      • Write
      • Get encoding
      • Set encoding (NOT SUPPORTED)
      • Redirect to custom writer
      • Is handle redirected?
    • Raw mode (enable/disable)
    • Signals
      • SIGINT
      • SIGQUIT
    • Window
      • Get width
      • Get height
  • macOS

    • STDIN
      • Read Key
      • Read Single Character
      • Read Line
      • Get encoding
      • Set encoding (NOT SUPPORTED)
      • Redirect to custom reader
      • Is handle redirected?
    • STDOUT/STDERR
      • Write
      • Get encoding
      • Set encoding (NOT SUPPORTED)
      • Redirect to custom writer
      • Is handle redirected?
    • Raw mode (enable/disable)
    • Signals
      • SIGINT
      • SIGQUIT
    • Window
      • Get width
      • Get height

About

A terminal abstraction with platform-specific drivers.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages