-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Support Windows through conpty
#95
Comments
Having windows support would be great.
PRs are welcome indeed :)
On Thu, Apr 30, 2020 at 1:29 AM Edgar Lee ***@***.***> wrote:
Windows 10 gained support for psuedo-terminals with conpty:
https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
Prior art:
- node-pty:
https://github.com/nodejs/node/blob/b3189266347fa05395860f9f6e8949e447977284/test/pseudo-tty/pty_helper.py
- neovim: neovim/neovim#11390
<neovim/neovim#11390>
Would you be open to a PR?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#95>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD7LZNURJEB7ZAQFBT77DLRPEEDXANCNFSM4MVF3YSA>
.
--
--
Guillaume J. Charmes
Software Engineer
https://blog.charmes.net
[image: Guillaume J. Charmes on about.me]
<https://blog.charmes.net>
|
Another option would be to use go-winpty but is based of winpty.dll. You can also look at the source of portable-pty from rust that supports both winpty and conpty. |
I noted in #50 that https://github.com/containerd/console has a console implementation for Windows. There's quite a bit of overlap with this library -- so it might be worth borrowing from that if someone were to open a PR. |
Any update on this? Would be so great to see this happen |
ActiveState implemented a Go library for conpty: termtest/conpty |
@mardukbp unfortunatelly termtest/conpty is based on CGO, which is not an option here as it would be a breaking change. We could consider it for a v2 though. @virtuald This looks interesting indeed, but as I have 0 experience with windows, I have no idea what's going on there.. If someone want to create a PR, I'd be happy to bring it in, but I don't think I'll have time to do it myself anytime soon. @liuhaowen478 We are looking for motived people to contribute :) |
@creack How do you know that termtest/conpty is based on CGO? As far as I can tell, it uses the |
As I have no experience with windows, I might be wrong and I didn't test it, but I saw this: https://github.com/ActiveState/termtest/blob/master/conpty/syscall_windows.go#L16 AFAIK, loading a plugin in go requires cgo (golang/go#19569) |
For what it's worth, here's what I get on a Windows machine:
|
According to the Go Wiki loading a DLL with syscall does not require cgo.
Yes, but termtest/conpty does not use go plugins. I think this library is good to go! 😉 |
@jeffreystoke I'll take a look this week, thanks for the pr! |
Has there been any progress on the ConPTY support for Windows so far? I noticed that this PR is still not merged. |
Not yet. concerns about breaking change and overall usability issue. I haven't yet been able to get this to work on my windows machine. |
I think we fixed a lot of usability issues. I have tested it with powershell.
|
@photostorm How did you getting it working? I have the following code:
output:
I can't seem to get a proper windows handle. == EDIT:RESOLVED == I should have used |
Glad you have made it working, just comment for others may have the same issue:
If you mean ref: |
@creack any chance to test it again? I'm pretty confident it works now. |
@jeffreystoke Thanks for the reply. I was able to make it work using the sample code in the readme, with only commenting out the section involving resize of the console. I still haven't found a good way to resize the console by listening for some event vs an inefficient polling for a size change. I did find an issue with running interactive console UI's like FAR manager. You can't navigate or pretty much do anything with the function keys. This does work on the *nix bash sessions. Can you confirm if it's just me? If so, can you provide a working sample? For those interested in the code I used:
|
Looks like a terminal escape sequence translation issue, result from my quick search suggests you should turn on Ref: https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences |
@creack I know it been a couple months, but what are the tasks you would like done for windows support for it to be merge. I can continue PR. |
Can I use it on Windows? |
any update on this? |
Windows 10 gained support for psuedo-terminals with
conpty
: https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/Prior art:
Would you be open to a PR?
The text was updated successfully, but these errors were encountered: