INNER CODE UNIT · Go
changeLivePrefix
c-bata/go-prompt · _example/live-prefix/main.go:35
func changeLivePrefix() (string, bool) {
return LivePrefixState.LivePrefix, LivePrefixState.IsEnable
}
func main() {
p := prompt.New(
executor,
completer,
prompt.OptionPrefix(">>> "),
prompt.OptionLivePrefix(changeLivePrefix),
prompt.OptionTitle("live-prefix-example"),
)
p.Run()
}