我正在编写一个应用程序,该应用程序通过自定义套接字从Windows控制台连接到Linux机顶盒,我需要通过TERM环境变量告诉Linux机顶盒具有什么功能.现在,我设置了TERM=dumb,但是它太有限了.特别是我需要Linux方面知道:
I am writing an application that connect to a Linux box from Windows console over a custom socket, and I need to tell the Linux box what my console is capable of through TERM environment variable. For now I set TERM=dumb, but it is too limited. In particular I need Linux side to know that:
在terminfo数据库中是否有用于此类Windows控制台的良好配置文件? 如果在此扩展配置文件的最上方有扩展配置文件,当我的应用程序最终识别ANSI颜色时可以使用该扩展配置文件吗?
Is there an good profile in terminfo database for such Windows console? If there is an extended profile on top of that that can be used when my app will finally recognize ANSI colors?
更新:有人投票以too broad的身份将其关闭.因此,我对问题进行了编辑,以非常具体地说明应反映在terminfo条目中的Windows控制台的功能.
UPDATE: Somebody voted to close this as too broad, so I edited the question to be very specific about capabilities of Windows console that should be reflected in terminfo entry.
推荐答案版本10中的Windows控制台和Windows终端功能强大得多.也许您可以摆脱TERM=xterm的困扰.
The windows console and windows terminal in version 10 are a lot more capable. You may be able to get away with TERM=xterm with those.
对于较旧的版本,也许首先考虑加载ANSICON.这增加了相当扎实的支持.
For older versions perhaps look into loading ANSICON first. This adds pretty solid support.
否则,请尝试使用简单的术语定义,例如不支持颜色的TERM=vt100.我可能不熟悉甚至更简单的条目,而不是愚蠢的.
Otherwise try a simple term definition, such as TERM=vt100 which doesn't support color. There may be even simpler entries a bit smarter than dumb, that I'm not familiar with.
更多推荐
Windows控制台的terminfo,该控制台使用read(stdin)作为输入
发布评论