From 60bab5e13b22056bb3caf36d632f8347a5f8dd8c Mon Sep 17 00:00:00 2001 From: zu1k Date: Mon, 15 Aug 2022 09:40:14 +0800 Subject: [PATCH] fix: quit & exit should exit nali Signed-off-by: zu1k --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 509c3a7d..7893b22e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -70,7 +70,7 @@ Find document on: https://github.com/zu1k/nali if gbk { line, _, _ = transform.String(simplifiedchinese.GBK.NewDecoder(), line) } - if line == "quit" || line == "exit" { + if line := strings.TrimSpace(line); line == "quit" || line == "exit" { return } _, _ = fmt.Fprintf(color.Output, "%s", entity.ParseLine(line).ColorString())