-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Add MSYS2 or cygwin support #133
Comments
In theory this could be made to work using the XTerm escapes. However the things that would have to be added relate to dealing with changing the terminal into raw vs cooked mode. This is different on Windows as it lacks the termios ioctls. |
I found that prefixing with
|
@gdamore: I might be interested in delving into this, could you point me to some more details on what be necessary to implement the changes? |
Well, I don't know how winpty works. That might be a starting point. The issue is that terminal handling (stty modes really) have to be made to work. Frankly, this seems ... backwards; a better solution would be to figure out if we can use a more "correct" method of dealing with the terminal on these systems -- like we do with a native Win32 API. |
performance wise, winpty kind of sucks
(looks like neither can track the mouse using the demo app) |
no real surprise there. its really an ugly hack but so is the whole mintty
thing. Use a native app if you want decent performance.
…On Fri, Mar 23, 2018 at 9:23 PM Nicholas Orr ***@***.***> wrote:
performance wise, winpty kind of sucks.
- cmd.exe > boxes.exe = 1.718ms / box
- git-bash.exe > mitty.exe > winpty boxes.exe = 2.916 ms / box
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#133 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABPDfX8VGOtlIzTtAuknIxpR-PJjRLH3ks5thcotgaJpZM4KyTig>
.
|
I don't think the difference of ~1 ms for a one time operation as a performance issue. Not fixing the issue though, is a definite performance issue. (I've never had any performance issues with Mintty, unlike the many iterations of CMD, PS, PWSH, etc.) So what is the current status on this? |
well you can use winpty now. |
btw that is 1ms per box. not a one time operation. out another way winpty adds about 50 percent or more to the cost of drawing on screen. |
This might be better in master now -- at least if $TERM is set, even on Windows, tcell no longer crashes out. You do need to have a terminal that supports the real Windows console API though. I'm looking at alternatives for the future -- because with Windows 10 it seems like we might want to support xterm style escape sequences in order to access the larger color space. |
Cygwin support would be very helpful. e.g. https://github.com/zyedidia/micro#cygwin-mingw-plan9 depends on this project. |
I still can't fathom why anyone would continue to use Mintty. It's usefulness is rather severely limited since it cannot support generic Windows console applications. |
@gdamore: I can tell you why I use it, and that's because a *nix-like environment in Windows is a nice way to get some of the large *nix ecosystem. I have used Windows most of my life as a professional and as a casual user, and I still prefer POSIX tools to the default Windows tools when developing cross-platform projects. I'm also a huge terminal nerd with all of the associated demand for easy scripting and avoiding specialized binary tools where reasonable, so that contributes enormously. :) |
@ErichDonGubler that's all fine, you can use cygwin or msys tools from a normal Windows 10 console host, or the new Windows 10 Terminal app, as well as a number of third party consoles (e.g. ConEmu). My specific complaint/issue is with mintty -- which implements only the POSIX TTY semantics and not the Windows console API. This means it can only be used with pure POSIX tools. Unfortunately, that's not tcell, as tcell attempts to be savvy about Windows vs. Linux. You can work around this with winpty, which adds the missing semantics to mintty. However, I would strongly advise trying out another terminal app. Anything you choose will almost certainly be an upgrade over mintty. (Back before Windows 10, having mintty was nice because it offered better support for resizing and tabbed usage. That was enough for some users to overcome it's other deficiencies. Since then numerous other options are available, and Microsoft has addressed the relevant short-comings in their own apps. In this day and age there are no benefits to mintty -- only limitations. From what I can tell, the mintty itself is largely abandonware, as they haven't addressed any of the short-comings.) |
Having tried the new Windows Terminal since your suggestion, and several other apps before (PuTTY, ConEmu,
|
I'd be curious to know what escapes aren't supported. I've found no issues and the modern terminal is a pretty close xterm implementation. It does include support for mouse escapes (which actual vt100 of course does not.) |
You do need to set TERM of course. |
There was just recently a mintty release. After over a 3 year hiatus. The fails for my definition of regular releases and may explain why I assumed it was abandonware. |
Sorry, I didn't mean VT100 escapes in the sense of the original device (which is the most sensible interpretation); my terminology was probably more offhanded than accurate. Apologies. :)
Most escapes seemed to work just fine, though I've had Unclear Weirdness™ with random ANSI escapes from some tools I use regularly (which I can list if you care); mouse escapes are the major ones I noticed not working (which I use a lot for
I know I tried explicitly setting the
Huh? Are we talking about the same project? There are 10 releases alone on the first page of the MinTTY Releases link I used above, all no earlier than February of this year, with an average of a few weeks between releases. A regular release cadence with gaps of at most a few months has been maintained since 2016 (maybe longer -- I abandoned looking further after going that far, since it goes longer than the 3 years you mention). |
Huh. Going back I think I misread Sep 17 and Sep 2017... Lol. My apologies for that - it's what I get for looking at that link on a phone instead of a real computer. As to mouse events; they Just Work. I use WSL sometimes, and tcell running under WSL, in a windows terminal, works fine. Mouse events including live mouse tracking Just Works. And because that's under WSL, its using plain old xterm escape sequences for mouse reporting. You can test this yourself by using a WSL session, the Windows 10 Terminal app, and then doing "go run _demos/mouse.go" This also works reasonably well (at least the last time I tried) under conemu. (Conemu may struggle with 24-bit colors.) I have found no case where Windows Terminal is deficient relative to other terminals in escape sequence handling. Indeed, these days it even supports 24-bit color using XTerm escapes. Much more likely is that you have some applications which were built to only work with mintty's magical emulation of a Linux terminal system -- most specifically terminfo (think stty). Yeah, Windows doesn't have that (although WSL does). Those applications aren't going to work in anything except a mintty environment. But you should consider running them in WSL instead -- your life will improve if you do. The only issues I've found in Windows terminal recently have been related some incomplete Unicode fonts. Unless you're using unusual characters (typically things like combing glyphs or newer Unicode glyphs) you're unlikely to even notice. (Support for this under Linux terminals is also varied, and I'd be surprised if mintty got this all correct.) The Microsoft team has worked hard to update the Terminal app to provide all the usual bells and whistles and compatibility that folks coming from a Linux background should expect, and I think they've done a good job. In fact, if you're using many Linux apps, I highly recommend WSL. It's a far more natural experience than the hackery that is attempting to run mingw apps. (It's a much more complete emulation of Linux, regardless of whether you use WSL 1 or WSL 2.) Minsys is an attempt to be a hybrid of both Windows and Linux, and in my opinion it simply brings the worst of both worlds; it's a compromise that maybe once made sense, but is no longer needed in this day and age. |
For now I'm closing this issue. I'm not interested in doing this. If someone can provide a simple solution (I don't think one exists) for this problem I'm happy to reconsider. I'm distinctly not interested in building a substantial amount of code just for mintty or to workaround the deficiencies in mintty. I suggest folks that really, really want mintty to work better with native Windows console apps ask the mintty people to look at implementing the Win32 console API. Good luck with that! |
Latest mintty seems to Just Work. It doesn't support mouse interaction, but the rest of it works well enough. |
I have further feedback in response to #133 (comment) (TL;DR: there are some fundamental limitations of WSL1/2 workflow that are interesting to note as caveats, part. file I/O being a sore point for performance in WSL2) that I haven't taken time to draft yet, but for now, I'm interested in clarifying:
@gdamore: You're referring to the MinTTY 3.4.4 that was released last month, then? At time of writing, that's the latest release. Or...maybe you're referring to bleeding edge commits? I'm not sure. |
I used the latest Cygwin download and whatever mintty was included.
Get Outlook<https://aka.ms/qtex0l> for iOS
…________________________________
From: Erich Gubler <notifications@github.com>
Sent: Monday, January 25, 2021 11:45:37 AM
To: gdamore/tcell <tcell@noreply.github.com>
Cc: gdamore <garrett@damore.org>; Mention <mention@noreply.github.com>
Subject: Re: [gdamore/tcell] Add MSYS2 or cygwin support (#133)
I have further feedback in response to (TL;DR: there are some fundamental limitations of WSL1/2 workflow that are interesting to note as caveats, part. file I/O being a sore point for performance in WSL2) that I haven't taken time to draft yet, but for now, I'm interested in clarifying:
Latest mintty seems to Just Work. It doesn't support mouse interaction, but the rest of it works well enough.
@gdamore<https://github.com/gdamore>: You're referring to the MinTTY 3.4.4 that was released last month<https://github.com/mintty/mintty/releases/tag/3.4.4>, then? At time of writing, that's the latest release. Or...maybe you're referring to bleeding edge commits? I'm not sure.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#133 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAJ4G7IUROCPEP4YIJYCMRLS3XC6DANCNFSM4CWJHCQA>.
|
So, there's been an MinTTY release since the last few comments (3.4.5), which leads me to believe that the version of MinTTY you were referring to is in the history of whatever ended up being released. However, none of the |
I would like to add support for mintty on windows. Would you what it would take? Or if there are any things blocking for this task?
The text was updated successfully, but these errors were encountered: