-
-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardcode Windows Terminal control sequences #2014
Comments
Would this be basically creating your own terminfo for Windows and is there any way to adopt the existing one and simply update it based on the list provided in the doc? |
i mean, is there an official one? i'm unable to get |
https://invisible-island.net/ncurses/terminfo.src.html#tic-ms-terminal See also microsoft/terminal#8303, as noted, there's no TERM env var available but other terminals are able to use their terminfo so there must be some way for notcurses to use that terminfo entry and update it though maybe it might just be better to create a new one based on what already exists. |
You could also just treat Windows Terminal as what it reports itself to be: |
oh agreed that there's a terminfo definition, just not a database. you need the defintiion because what if i'm using Microsoft Terminal and ssh into a linux machine. that linux machine needs a correct terminfo definition for windows terminal. but i'm not seeing a bunch of terminfo database entries on a windows machine, and @magiblot stated over in #463 that it's really not a thing there, that there is generally just the one terminal on windows. |
however, this terminfo definition will be useful to me, as it tells me exactly what to hardcode =]. |
looks like we also need to roll our own |
i don't know what happened to the windows build, but it's completely failing on stupid shit, and even master's builds have been broken since yesterday due to some rust, and it's all very depressing and i don't want to work on this anymore right now. i'll come back to it in a few days. i hope |
The finest example of this is, as @WSLUser noted, that the This doesn't mean terminfo isn't useful at all, but rather that you can live without it. Which path is easier to take depends on your application. When I tried to solve this problem in Turbo Vision I had no dependency on terminfo, so I just ignored it and went the Win32-Console-API way:
If you can't get rid of terminfo because you need to reason about terminal capabilities, you could try assuming |
Mintty actually has it's own terminfo database (due to some private sequences it uses) though you can use xterm-256color as well and will work reasonably well. |
That definition is outdated so be sure you use the doc as the primary source. |
Hrmmm, this doesn't make sense to me. If I'm redirected to a file, why would I want to pop up a console window? I'd just emit my output into that file, like I do everywhere else.
Well, I realized that I want to keep terminfo to keep using |
yeah, noticed that, am doing so. i expect this to be done tonight, but last night i was running into strange and seemingly sudden build failures on windows, so who knows. admittedly, i'd been up for about 48 hours, so who knows whether any of it was real. |
Exactly. I was not suggesting that you should do it that way, it was just an example of an application embracing the Win32 Console API instead of using terminfo. |
grokked, thanks for the clarification |
I've loaded the most important escapes into |
Now that #2009 is complete, we're no longer failing in the
setupterm()
call on Windows. We're also entirely without control sequence data. Using the handy guide at https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences, hardcode these in a Windows-only variant ofinterrogate_terminfo()
. I think we'll then work on Windows, in some capacity.The text was updated successfully, but these errors were encountered: