From 279b0cf250365f51dbd0cb928e39ab591f907fad Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Tue, 27 Oct 2020 03:05:10 +0300 Subject: [PATCH] fix logging when setting 'info' option to empty --- eval.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eval.go b/eval.go index f7fa7f99..651ead60 100644 --- a/eval.go +++ b/eval.go @@ -241,10 +241,14 @@ func (e *setExpr) eval(app *app, args []string) { case "ifs": gOpts.ifs = e.val case "info": + if e.val == "" { + gOpts.info = nil + return + } toks := strings.Split(e.val, ":") for _, s := range toks { switch s { - case "", "size", "time", "atime", "ctime": + case "size", "time", "atime", "ctime": default: app.ui.echoerr("info: should consist of 'size', 'time', 'atime' or 'ctime' separated with colon") return