fix logging when setting 'info' option to empty
This commit is contained in:
1 parent
f69c24e357
commit
279b0cf250
1 file changed
+5
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user