-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Can't run shells in interactive mode #58
Comments
Hi Felipe 👋 Thanks for rasing the issue and using Would you have time to investigate potential fix? |
It looks like the issue is that
I think to be able to wrap interactive commands, we would need another thread to manage stdin. |
I was able to use https://github.com/stripe/subprocess to wrap an interactive command. |
@ryansch - mind providing a code snippet to show how you used subprocess to solve this? |
@codefriar I'd like this to be fixed in the |
@piotrmurach My apologies. My initial read of @ryansch 's comment was that he'd gotten this to work in tty-command perhaps by utilizing the subprocess command. I was hoping to prompt him to share his fix for tty-command. |
Hi all, is this possible now? When I run a shell in a subprocess with pty: true (for example kubectl to open a shell in a pod in Kubernetes), the shell starts and I can press keys etc but when I press enter nothing happens in the shell. Any suggestion? Thanks! |
I just wrote https://github.com/outstand/dash/blob/cd7c740afd1dc7fa809afd630e8a50ee68e391ca/lib/state.rb#L65 to integrate |
@codefriar I finally did... ^ |
I looked at the differences between |
@ryansch Do you have any suggestions on helping tackle this issue in |
I had originally thought about grafting subprocess into this gem but I think exposing the streams might be all we need. I'll see if I can't work up an experiment to test it. |
@codefriar , @ryansch I just read this thread and wanted to offer an alternative data point that I did interpret your posts as trying to fix or work arouind this issue rather than recommending or documenting the use of other gems. Thanks for your efforts. |
Describe the problem
Shells cannot be run with TTY::Command. Keyboard input is not read by the shell.
Steps to reproduce the problem
Actual behaviour
(slightly edited to remove identifying information)
Expected behaviour
A working interactive shell.
Describe your environment
The text was updated successfully, but these errors were encountered: