Allow applications to override information obtained from terminfo

Registered by Paul "LeoNerd" Evans

There already exist situations (e.g. the t_* variables in vim) that users expect to be able to override terminfo information in applications, and it's likely these will continue to exist. It would be great if the termdriver could support this ability.

One way to solve this would be to provide some function on the term that new terminfo strings can be supplied, to override whatever the driver obtained from terminfo.

  tickit_term_driver_set_capstring(tt, capname, new_s, new_len);

A few design questions come to mind here:

  * How to handle non straight-terminfo driver cases, such as the xterm driver subclass(as will be).
  * How to specify which terminfo string - should we invent yet another namespace enumeration for them? Should they be specified by sring name, as per (one of the) terminfo scheme(s)? Unibilium's enum?

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
Paul "LeoNerd" Evans
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon v0.3
Started by
Paul "LeoNerd" Evans
Completed by
Paul "LeoNerd" Evans

Related branches

Sprints

Whiteboard

> How to specify which terminfo string - should we invent yet another namespace enumeration for them? Should they be specified by sring name, as per (one of the) terminfo scheme(s)? Unibilium's enum?

I think you should add another enum, but only for the capabilities used by libtickit.

---

On further thought, I think specifying the capability by string names is probably easiest; it fits best with projects like neovim who want to allow users to configure them as user input anyway. Inventing a new enum works fine if the project itself "controls" that enumeration, but here we don't - these are unibilum's settings really.

---

Or maybe, internally they're some kind of opaque enum that *might* be reusing unibilium's but we make no guarantee, and provide a string->enum lookup function for convenience.

---

There might also be precedent in the libtermkey hack for this:

364: Paul "LeoNerd" Evans 2016-11-30 Add a (currently-undocumented) way for callers to override terminfo database lookups

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.