A library to read compiled, binary terminfo descriptions.
Перейти к файлу
Patrik Svensson 3c3e254915 Update terminfo capabilities to v6.5 2024-09-03 22:17:55 +02:00
.github Upgrade to .net8.0 2023-11-15 00:49:42 +01:00
scripts Update terminfo capabilities to v6.5 2024-09-03 22:17:55 +02:00
src Update terminfo capabilities to v6.5 2024-09-03 22:17:55 +02:00
.editorconfig Initial commit 2021-04-05 14:04:00 +02:00
.gitignore Initial commit 2021-04-05 14:04:00 +02:00
LICENSE.md Initial commit 2021-04-05 14:04:00 +02:00
README.md Add usage instructions 2021-04-06 22:16:11 +02:00
build.cake Upgrade to .net8.0 2023-11-15 00:49:42 +01:00
dotnet-tools.json Update Cake to 4.0.0 2024-09-03 22:12:28 +02:00
global.json Update .NET SDK to 8.0.401 2024-09-03 22:12:42 +02:00

README.md

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.