Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ChafaTermDb #163

Open
hpjansson opened this issue Sep 4, 2023 · 0 comments
Open

Refactor ChafaTermDb #163

hpjansson opened this issue Sep 4, 2023 · 0 comments
Labels
feature New feature or request tidiness Code organization and compliance

Comments

@hpjansson
Copy link
Owner

I gave ChafaTermDb a minimal API initially, since I wanted to gather more information about typical situations/available terminals and then refactor at a later time based on that.

That time is now extremely nigh.

Existing methods can stay the same, but internally it would be nice to get rid of the big heuristics hairball and instead relegate each terminal to a table of pointers to groups of seqs. E.g. vt100 + 256-color SGRs + sixels for mlterm. Terminal capabilities could then be merged successively using the existing merge API (e.g. if running in tmux, we could merge tmux on top of mlterm).

This must be done very carefully in order to avoid regressions.

Terminals (or perhaps "situations") could then be given names, which could be exposed to callers. This could then be used as a sequence library for the query-based detection functionality.

Names will also allow API users to identify which overall terminal/situation was actually detected, and not just the individual sequences.

@hpjansson hpjansson added feature New feature or request tidiness Code organization and compliance labels Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request tidiness Code organization and compliance
Projects
None yet
Development

No branches or pull requests

1 participant