Skip to content
This repository was archived by the owner on Aug 16, 2026. It is now read-only.
This repository was archived by the owner on Aug 16, 2026. It is now read-only.

Provide a simplified terminal capability API #25

Description

@alexrp

This API will probably wrap TermInfo.

The API should be simplified so as to not bother with quirks of ancient terminals and emulators almost nobody uses anymore.

Activity

  1. added
    state: approved
    area: samples
    on Nov 20, 2021
  2. self-assigned this
    on Nov 20, 2021
  3. alexrp commented on Nov 21, 2021

    @alexrp
    SponsorMemberAuthor

    We probably won't have to use this API in the library itself. Once #22 is implemented, we can just leave it up to users to decide how hard they want to try to follow terminal capability information while constructing escape sequences.

  4. alexrp commented on Nov 25, 2021

    @alexrp
    SponsorMemberAuthor

    One option for implementing this would be to bundle the compiled terminfo files. They could be embedded as resources in a separate System.Terminal.Capabilities.dll which would expose a TerminalCapabilities class for accessing them. That way, users wouldn't have to worry about missing a terminfo database on Windows. This would of course be a separate NuGet package since the complete terminfo database is a bit large for the core package.

  5. added
    area: capabilities
    area: documentation
    and removed on Nov 28, 2021
  6. alexrp commented on Dec 6, 2021

    @alexrp
    SponsorMemberAuthor

    The only question that really remains is: Where should the build of the package fetch the compiled terminfo files from?

  7. modified the milestones: v1.0, v2.0 on Dec 20, 2021
  8. added
    area: build
    on Dec 30, 2021
  9. alexrp commented on Dec 30, 2021

    @alexrp
    SponsorMemberAuthor

    Another option would be to embed terminfo.src and parse that instead of the compiled files.

    Yet another option, if we're embedding the database anyway, would be to process it during build and just use a C# source generator to emit all the relevant data as C# code...

  10. alexrp commented on Dec 14, 2023

    @alexrp
    SponsorMemberAuthor

    I think processing the database from source is a non-starter; I don't want to essentially reinvent tic. I also want the Cathode build process to remain super simple (./cake).

    So, I think what we'll do is just store the compressed description files in the repository. That's a bit unfortunate, but they don't evolve that often, so the repository size shouldn't be affected too much. We can then have a script that be run manually to update the descriptions (likely by grabbing an ncurses-term package from one of the major Linux distributions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: buildarea: capabilitiesarea: documentationarea: samplesstate: approved

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions