Skip to content

[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

@xiangyu5632

Description

@xiangyu5632

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

bug

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, exitorCtrl-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

That's how I find it :
bug2

  • Operating System: Linux (CentOS 8.5)
  • Terminal Emulator: XShell
  • tag of go-prompt or commit revision: 0.2.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions