Skip to content

Commit

Permalink
fix: quit & exit should exit nali
Browse files Browse the repository at this point in the history
Signed-off-by: zu1k <i@zu1k.com>
  • Loading branch information
zu1k committed Aug 15, 2022
1 parent ed0fe1d commit 60bab5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 60bab5e

Please sign in to comment.