You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.
package main
import (
"fmt"
prompt "github.com/segmentio/go-prompt"
)
funcmain() {
str:=prompt.String("Enter some string")
fmt.Println("Read:", str)
}
running it shows that it breaks at the first space, rather than at the newline:
vagrant@vagrant-ubuntu-trusty-64:/opt/secrets$ go run test.go
Enter some string: ljadjf lasdjflaksjflasdjfl asjfladjsfl
Read: ljadjf
vagrant@vagrant-ubuntu-trusty-64:/opt/secrets$ asdjflaksjflasdjfl asjfladjsfl
asdjflaksjflasdjfl: command not found
I think the expected behavior is that it should function like readline and terminate after a newline, not after a space is inputted.
The text was updated successfully, but these errors were encountered:
jandre
added a commit
to jandre/go-prompt
that referenced
this issue
Apr 20, 2015
Test code:
running it shows that it breaks at the first space, rather than at the newline:
vagrant@vagrant-ubuntu-trusty-64:/opt/secrets$ go run test.go Enter some string: ljadjf lasdjflaksjflasdjfl asjfladjsfl Read: ljadjf vagrant@vagrant-ubuntu-trusty-64:/opt/secrets$ asdjflaksjflasdjfl asjfladjsfl asdjflaksjflasdjfl: command not found
I think the expected behavior is that it should function like readline and terminate after a newline, not after a space is inputted.
The text was updated successfully, but these errors were encountered: