Open scotws opened 5 years ago
I actually haven't tried this before. It's most likely a bug. I'll look into it.
@abiosoft Thank you! In case it helps, the long version of the code is https://github.com/scotws/angua-go/blob/ttyswitch/cli/cli.go (very alpha, though, I'm in the middle of rebuilding the basic code structure).
Apols if I'm making a mistake here and this is not a bug - I would like to be able to access ishell through another terminal instance on Linux with go 1.12.5. So first, I set up a listener (leaving out error handling and
defer
here to keep the code short):where host is "localhost:8000" for testing. Next, I've imported
"github.com/abiosoft/readline"
to be able to run the shell with the listener's connection parameters in the configuration for NewWithConfig:Then I start the shell in a second terminal window through the listener:
This works fine when I open another shell and connect with
nc localhost 8000
- except for the fact that after I type in a command such ashelp
, the input line is not only echoed character for character as expected, but then printed again, giving me stuff likeI'm wondering if StdinWriter is the problem here, but changing that doesn't seem to help. I can't find an example for
NewWithConfig
in the docs. Is this a bug or am I missing something obvious? Thanks!