code: func newTerminalPrompter() *terminalPrompter {
  	p := new(terminalPrompter)
  	// Get the original mode before calling NewLiner.
  	// This is usually regular "cooked" mode where characters echo.
  	normalMode, _ := liner.TerminalMode()
  	// Turn on liner. It switches to raw mode.
  	p.State = liner.NewLiner()
  	rawMode, err := liner.TerminalMode()
  	if err != nil || !liner.TerminalSupported() {
  		p.supported = false
  	} else {
  		p.supported = true
  		p.normalMode = normalMode
  		p.rawMode = rawMode
  		// Switch back to normal mode while we're not prompting.
  		normalMode.ApplyMode()
  	}
  	p.SetCtrlCAborts(true)
  	p.SetTabCompletionStyle(liner.TabPrints)
  	p.SetMultiLineMode(true)
  	return p
  }
docs: // newTerminalPrompter creates a liner based user input prompter working off the
  // standard input and output streams.