22 pointsby nikbackma day ago3 comments
  • kazinator17 hours ago
    I don't use terminfo. It is less standardized than ANSI terminal control. POSIX defines next to nothing about it beyond its existence.

    While it can help programs work with totally different terminals, that has next to no value in the world in which everything speaks ANSI.

    There are terminal-specific extensions to ANSI. Some of those are popular and so de facto standard. You can get away with using them.

    terminfo won't help you with the ones that don't work everywhere. It cannot magically make a feature appear where it doesn't exist.

    Antirez's Linenoise line editing library uses the escape goes directly. This is brilliant and helps it achieve its small size and no dependencies.

    Every time I need to make any kind of program that uses terminal features I just use the sequences likewise.

  • stuaxo5 hours ago
    caniuse for ANSI is a great idea.

    There are new things happening (I mean within the last 15 years or so) and this could help spread the knowledge.