1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 13:19:02 +08:00

fix: quit & exit should exit nali

Signed-off-by: zu1k <i@zu1k.com>
This commit is contained in:
zu1k 2022-08-15 09:40:14 +08:00
parent ed0fe1d8ed
commit 60bab5e13b
No known key found for this signature in database
GPG Key ID: AE381A8FB1EF2CC8

View File

@ -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())