News for hackers. Stuff that matters.
Re:ANSI escape codes (2019) by blueflow on Wednesday February 03, 2021 @07:38AM (#26013085)
The git approach here is not "not caring about terminfo", but delegating the caring (of the difficult parts at least) to another program, namely the pager. The default pager `less` depends on the information in TERM and the terminfo database, and it has to, since functions like toggling to the alternate screen buffer are not standardized per ansi.
Re:ANSI escape codes (2019) by account42 on Wednesday February 03, 2021 @08:47AM (#26013519)
git works without a pager too.

I agree that you will need something like terminfo if you writing a TUI like a pager, but for most CLI programs you only need simple color output and maybe cursor movement on and erasing of the current line and for that terminfo is an unnecessary dependency.

Re:ANSI escape codes (2019) by blueflow on Wednesday February 03, 2021 @09:20AM (#26013768)
Line editing is tricky enough that i would recommend a thing like the readline library, which in turn uses ncurses.

Just for colored output alone, i agree.