Hacker News new | past | comments | ask | show | jobs | submit login

Terminal abstraction libraries feel like a relict of the past to me, because there used to be a lot of diversity in command sets and capabilities. Nowadays you can pretty much just assume that most commands work everywhere, so there is a lot less reason to drag around ncurses and friends if you want to make a progress bar that doesn't break your output or have some colored text.



Oh, but you just can't. MacOS's zsh can't deal with my tmux shell when I ssh in. There's all kinds of great features that allow for basically using pixel buffers in a shell if you stray away from the default terminal implementations. Getting colors to work properly is also still a pain.


Ncurses and friends could be overkill but there is still value in small wrapper libraries that provide a higher level API on top of escape codes.

`setCursor(lines, 0)` is more readable than `write(f"\033[{lines};0f")`


There is still a ton of diversity (underline color, curly underlines, synchronization, and image support for example), but it's nearly impossible to figure out what features are available in a given terminal. I just finished adding vt400 support to iTerm2 this week but I doubt any of it will be used because it's not widely available enough for people to bother.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: