diff --git a/example/readline-multiline/readline-multiline.go b/example/readline-multiline/readline-multiline.go index cb01d2b..2192cf6 100644 --- a/example/readline-multiline/readline-multiline.go +++ b/example/readline-multiline/readline-multiline.go @@ -28,7 +28,7 @@ func main() { continue } cmds = append(cmds, line) - if !strings.Contains(line, ";") { + if !strings.HasSuffix(line, ";") { rl.SetPrompt(">>> ") continue } diff --git a/readline.go b/readline.go index 6ff97be..4b866fb 100644 --- a/readline.go +++ b/readline.go @@ -152,7 +152,7 @@ func (i *Instance) SetMaskRune(r rune) { i.Operation.SetMaskRune(r) } -// change hisotry persistence in runtime +// change history persistence in runtime func (i *Instance) SetHistoryPath(p string) { i.Operation.SetHistoryPath(p) }