Description
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-D to 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
- Operating System: Linux (CentOS 8.5)
- Terminal Emulator: XShell
- tag of go-prompt or commit revision: 0.2.6
Activity