From 49dbeed6877737d97ec6e121763a41c617d7b272 Mon Sep 17 00:00:00 2001 From: Lynn Cyrin Date: Wed, 11 Sep 2019 20:24:42 -0700 Subject: [PATCH] handle `=` input --- command.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/command.go b/command.go index 6471f10..d52080e 100644 --- a/command.go +++ b/command.go @@ -252,10 +252,11 @@ func reorderArgs(commandFlags []Flag, args []string) []string { } func argIsFlag(commandFlags []Flag, arg string) bool { - strippedArg := strings.ReplaceAll(arg, "-", "") + arg = strings.ReplaceAll(arg, "-", "") + arg = strings.Split(arg, "=")[0] for _, flag := range commandFlags { for _, key := range strings.Split(flag.GetName(), ",") { - if key == strippedArg { + if key == arg { return true } }