TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Standards for ANSI Escape Codes

24 点作者 nikbackm2 个月前

3 条评论

kazinator2 个月前
I don&#x27;t use terminfo. It is less standardized than ANSI terminal control. POSIX defines next to nothing about it beyond its existence.<p>While it can help programs work with totally different terminals, that has next to no value in the world in which everything speaks ANSI.<p>There are terminal-specific extensions to ANSI. Some of those are popular and so de facto standard. You can get away with using them.<p>terminfo won&#x27;t help you with the ones that don&#x27;t work everywhere. It cannot magically make a feature appear where it doesn&#x27;t exist.<p>Antirez&#x27;s Linenoise line editing library uses the escape goes directly. This is brilliant and helps it achieve its small size and no dependencies.<p>Every time I need to make any kind of program that uses terminal features I just use the sequences likewise.
tssva2 个月前
dup <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43294471">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=43294471</a>
stuaxo2 个月前
caniuse for ANSI is a great idea.<p>There are new things happening (I mean within the last 15 years or so) and this could help spread the knowledge.