Skip to content

Commit

Permalink
Open ended matching of foot terminfo names
Browse files Browse the repository at this point in the history
Initially, foot had exactly two terminfos: foot and foot-direct.

Then, these got upstreamed to ncurses, but with certain non-standard
capabilities stripped.

Foot has therefore continued to ship the original terminfo files, but
under different names.

These are _usually_ called foot-extra and foot-extra-direct, but the
end decision is the distributions’.

To handle this, match against “foot” and “foot-*”.
  • Loading branch information
dnkl authored and hpjansson committed Dec 25, 2021
1 parent 67058d7 commit 6fc7358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chafa/chafa-term-db.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ detect_capabilities (ChafaTermInfo *ti, gchar **envp)
gfx_seqs = sixel_seqs;
}

if (!strcmp(term, "foot") || !strcmp(term, "foot-direct"))
if (!strcmp (term, "foot") || !strncmp (term, "foot-", 5))
gfx_seqs = sixel_seqs;

/* rxvt 256-color really is 256 colors only */
Expand Down

0 comments on commit 6fc7358

Please sign in to comment.