Skip to content

Commit 60bab5e

Browse files
committed
fix: quit & exit should exit nali
Signed-off-by: zu1k <i@zu1k.com>
1 parent ed0fe1d commit 60bab5e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)