-
-
Notifications
You must be signed in to change notification settings - Fork 217
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
A change was added in #507 which allowed for more graceful termination, however the default functionality does not properly exit.
package main
import (
"fmt"
"github.com/pterm/pterm"
)
func main() {
list := []string{"hello", "world", "example"}
selectedItem, _ := pterm.DefaultInteractiveSelect.
WithDefaultText("Select an item").
WithMaxHeight(20).
WithOptions(list).
Show()
fmt.Println("selected item:", selectedItem)
}
Expected output when running Ctrl + C
$ go run main.go
Select an item [type to search]:
> hello
world
example
exit status 1
Actual output:
$ go run main.go
Select an item [type to search]:
> hello
world
example
selected item: hello
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working