-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Labels
Description
Bug reports
Mac os bigsur
go version go1.16.2 darwin/amd64
go-prompt v0.2.6
iTerm2
code :
main.go
package main
import (
"fmt"
"github.com/c-bata/go-prompt"
)
func completer(d prompt.Document) []prompt.Suggest {
s := []prompt.Suggest{
{Text: "users", Description: "Store the username and age"},
{Text: "articles", Description: "Store the article text posted by user"},
}
return prompt.FilterHasPrefix(s, d.GetWordBeforeCursor(), true)
}
func main() {
fmt.Println("Please select table.")
t := prompt.Input("👻 > ", completer)
fmt.Println("You selected " + t)
}
in iterm2 run go run main.go after exit the program,and than run go run main2.go ctrl+c not work
can not exit program
main2.go
package main
import "time"
func main() {
time.Sleep(100*time.Second)
}
open a new iterm2 tab run go run main2.go than ctrl+c can exit the program
securisec, qrtt1, iainduncani, leefernandes, eliaskoromilas and 5 more