Fixes #261 -- Quit repl when user types "exit"

This commit is contained in:
Tim Lebel 2015-06-02 22:18:36 -07:00 committed by Tim Lebel
parent 41f1a2b9a9
commit 74c7c6bfa5

View file

@ -160,6 +160,10 @@ func Repl(h *graph.Handle, queryLanguage string, cfg *config.Config) error {
h.QuadWriter.RemoveQuad(quad)
continue
case "exit":
term.Close()
os.Exit(0)
default:
if cmd[0] == ':' {
fmt.Printf("Unknown command: %q\n", cmd)