mirror of
https://github.com/manifoldco/promptui.git
synced 2026-03-14 22:35:53 +01:00
Merge pull request #125 from preethamrn/custom-stdio
Set custom stdio for Prompt
This commit is contained in:
commit
3e209d236a
1 changed files with 4 additions and 4 deletions
|
|
@ -47,8 +47,8 @@ type Prompt struct {
|
|||
// the Pointer defines how to render the cursor.
|
||||
Pointer Pointer
|
||||
|
||||
stdin io.ReadCloser
|
||||
stdout io.WriteCloser
|
||||
Stdin io.ReadCloser
|
||||
Stdout io.WriteCloser
|
||||
}
|
||||
|
||||
// PromptTemplates allow a prompt to be customized following stdlib
|
||||
|
|
@ -118,8 +118,8 @@ func (p *Prompt) Run() (string, error) {
|
|||
}
|
||||
|
||||
c := &readline.Config{
|
||||
Stdin: p.stdin,
|
||||
Stdout: p.stdout,
|
||||
Stdin: p.Stdin,
|
||||
Stdout: p.Stdout,
|
||||
EnableMask: p.Mask != 0,
|
||||
MaskRune: p.Mask,
|
||||
HistoryLimit: -1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue