fix logging when setting 'info' option to empty

This commit is contained in:
Gokcehan committed 2020-10-27 03:07:38 +03:00
1 parent f69c24e357
commit 279b0cf250
1 file changed
+5 -1
+5 -1
View File
@@ -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