This commit is contained in:
debing.sun 2026-02-03 18:13:50 +02:00 committed by GitHub
commit 7fca081d74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -1169,6 +1169,7 @@ static sds addHintForRepeatedArgument(sds hint, cliCommandArg *arg) {
hint = sdscat(hint, "[");
if (arg->flags & CMD_ARG_MULTIPLE_TOKEN) {
assert(arg->token);
hint = sdscat_orempty(hint, arg->token);
if (arg->type != ARG_TYPE_PURE_TOKEN) {
hint = sdscat(hint, " ");

View file

@ -207,6 +207,7 @@ class Argument(object):
s += "CMD_ARG_MULTIPLE|"
if self.desc.get("multiple_token", False):
assert self.desc.get("multiple", False) # Sanity
assert "token" in self.desc
s += "CMD_ARG_MULTIPLE_TOKEN|"
return s[:-1] if s else "CMD_ARG_NONE"