diff --git a/core/commands.go b/core/commands.go index b4bf3c35..5e98c021 100644 --- a/core/commands.go +++ b/core/commands.go @@ -105,7 +105,11 @@ func (a Argument) String() string { subs = strings.TrimSpace(subs) s += " " + subs if a.Variadic { - s += " [" + subs + " ...]" + if len(names) == 0 { + s += " [" + subs + " ...]" + } else { + s += " [" + names[len(names)-1] + " ...]" + } } if a.Multiple { s += " ..." diff --git a/core/commands_gen.go b/core/commands_gen.go index b36ef6e6..099dff91 100644 --- a/core/commands_gen.go +++ b/core/commands_gen.go @@ -105,7 +105,11 @@ func (a Argument) String() string { subs = strings.TrimSpace(subs) s += " " + subs if a.Variadic { - s += " [" + subs + " ...]" + if len(names) == 0 { + s += " [" + subs + " ...]" + } else { + s += " [" + names[len(names)-1] + " ...]" + } } if a.Multiple { s += " ..."