Skip to content

Commit 60bab5e

Browse files
committed
fix: quit & exit should exit nali
Signed-off-by: zu1k <[email protected]>
1 parent ed0fe1d commit 60bab5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Find document on: https://github.com/zu1k/nali
7070
if gbk {
7171
line, _, _ = transform.String(simplifiedchinese.GBK.NewDecoder(), line)
7272
}
73-
if line == "quit" || line == "exit" {
73+
if line := strings.TrimSpace(line); line == "quit" || line == "exit" {
7474
return
7575
}
7676
_, _ = fmt.Fprintf(color.Output, "%s", entity.ParseLine(line).ColorString())

0 commit comments

Comments
 (0)