Skip to content

A library to read compiled, binary terminfo descriptions.

License

Notifications You must be signed in to change notification settings

spectreconsole/terminfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terminfo

A library to read compiled, binary terminfo descriptions.

TermInfo NuGet Version

Usage

// Load the active terminfo description
var info = TermInfoDesc.Load();

// Load via terminfo name
var info = TermInfoDesc.Load("xterm-256color");

// Default capabilities are strongly typed
Debug.Assert(info.MaxColors == 256)

// But extended capabilities are also supported
bool? ax = info.Extended.GetBoolean("AX");
int? u8 = info.Extended.GetNum("U8");
string? kup = info.Extended.GetNum("kUP");

Building

We're using Cake as a dotnet tool for building. So make sure that you've restored Cake by running the following in the repository root:

> dotnet tool restore

After that, running the build is as easy as writing:

> dotnet cake

Acknowledgement

This code is partly a port of https://github.com/xo/terminfo, licensed under MIT.

About

A library to read compiled, binary terminfo descriptions.

Resources

License

Stars

Watchers

Forks

Sponsor this project