From 7dfdcb51c0c5dbb4ae15bc3684e54b078296b2c2 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sun, 21 Feb 2021 19:21:06 +0300 Subject: [PATCH] unset shellopts when empty --- eval.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eval.go b/eval.go index 993ea12..e83aa3b 100644 --- a/eval.go +++ b/eval.go @@ -310,6 +310,10 @@ func (e *setExpr) eval(app *app, args []string) { case "shell": gOpts.shell = e.val case "shellopts": + if e.val == "" { + gOpts.shellopts = nil + return + } gOpts.shellopts = strings.Split(e.val, ":") case "sortby": switch e.val {