-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
use default console in cygwin and mintty emulators on Windows #41
Comments
I just found out that |
That's quite unexpected behaviour. I would be curious to find out what Alternatively, I think we could detect what is being used by calling some utility functions. Kind of like features sniffing. For example, cygwin comes with system('cygcheck --version') # returns true if exits with 0 status or nil otherwise Same for the system('mintty --version') # true or nil Obviously it is not the most optimum solution as there is more emulators out there but hopefully would make it work for majority of Windows users and with time we could refine it. This feature detection shouldn't make the tool slower as this check is only performed when you create the prompt instance. Would you mind checking this theory? |
@kke Did you have any chance to look into this? I'm hoping to release new version this weekend. |
Seems like it's a problem for a lot of projects. Git for windows has solved it with some strange hackery: http://git.661346.n2.nabble.com/PATCH-mingw-make-isatty-recognize-MSYS2-s-pseudo-terminals-dev-pty-td7654456.html Here's some rust tty package pull request that fixed it: There's some c-source here: mintty/mintty#482 (comment) |
I think there are two issues that we are discussing here. Original issue was to correctly recognise whether this library has to use Unix console capabilities or Windows specific api. The problem was if I understood correctly that everything works fine in Windows console/powershell. However things stop working fine when Cygwin/mintty are used as In other words, this gem doesn't care what |
Nothing works in mintty without some wizardry, mintty is "broken" (I
suppose it's one those feature vs bug type of things. Separate issue
anyways.)
On Feb 25, 2017 02:02, "Piotr Murach" <notifications@github.com> wrote:
I think there are two issues that we are discussing here. Original issue
was to correctly recognise whether this library has to use Unix console
capabilities or Windows specific api. The problem was if I understood
correctly that everything works fine in Windows console/powershell. However
things stop working fine when Cygwin/mintty are used as tty-prompt assumes
windows environment and ideally would run as if standard unix console is
present. That is why I suggested to run specific utilities to figure this
stuff out.
In other words, this gem doesn't care what tty? value is as it is not used
for anything in the code base. It is down to client to figure out whether
it is dealing with console, file io or some other thing. tty-prompt prints
to standard out by default wherever that may be. You can pass :stdin
parameter to instruct to output to whatever but it is not the concern of
this library per se.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AANuy9hocHIQmMjnABqQEQikhoCpCUQVks5rf2-bgaJpZM4MCYom>
.
|
I have changed |
@kke Released |
I think your
windows?
is true for cygwin (or MinTTY which also comes with git for windows). Seems like the windows keyreader does not work under it. (the normal non-windows stuff should work fine) by @kkeThe text was updated successfully, but these errors were encountered: