-
Notifications
You must be signed in to change notification settings - Fork 354
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
[Bug] In the v0.2.6 , the icnl attribute of the stty is modified, but the attribute is not restored. v0.2.5 is ok #266
Comments
Fairly old issue I know, but I've fixed this issue @xiangyu5632 #274 I've forked it as well, though I'm hoping someone else is maintaining this. |
@joeycumines Unfortunately no one has been maintaining it for the last 2/3 years. I've created a fork and merged lots of PRs from this repo. I use it to build a REPL for my programming language, but I want to maintain it as an independent library. https://github.com/elk-language/go-prompt I'd gladly look over your PR in my fork if you're interested. |
It'll have to wait until tomorrow, but I'll take a look and probably make a PR, cheers @Verseth |
It does appear to be fixed already in your fork, FYI @Verseth. There's an additional minor (probably inconsequential) bug so I made a PR anyway: elk-language#16 I'm presently feeling a little apathetic towards the implementation as a whole, but I'll consider using your fork. |
There was another bug specific to your fork @Verseth, it's also fixed in elk-language#16 - it restores the terminal parameters correctly, now. |
Bug reports
I use go-prompt to develop my own CLI client program. After exiting the client, press Enter and enter no line break. No command is displayed, but the command is executed. This can be eliminated by entering the stty sane command, so I determined that go-prompt modified the stty attribute. Switch to v0.2.5 and no problem.
the icnl attribute of the stty is modified, but the attribute is not restored.
Expected Behavior
Current Behavior and Steps to Reproduce
That's how I used it:
fmt.Printf("openGemini CLI %s (rev-%s)\n", CLIENT_VERSION, "revision") fmt.Println("Please use
quit,
exitor
Ctrl-Dto exit this program.") completer := NewCompleter() p := prompt.New( c.executor, completer.completer, prompt.OptionTitle("openGemini: interactive openGemini client"), prompt.OptionPrefix(">>> "), prompt.OptionPrefixTextColor(prompt.DefaultColor), prompt.OptionCompletionWordSeparator(FilePathCompletionSeparator), ) p.Run() return nil
That's how I find it :
The text was updated successfully, but these errors were encountered: