Skip to content

[BUG] Syntax of command arg with token and multiple (e.g. CLIENT LIST)Β #115

Open
@zuiderkwast

Description

@zuiderkwast

This is about command arguments specified in the JSON file with these properties:

  • a "token" property,
  • a "type" that is not "pure-token" and
  • "multiple": true
  • ("optional": true in the examples below, but otherwise, it just affects the use of [ ] vs < >)

For arguments like this, the token is displayed as to be repeated for each argument.

Example: The CLIENT LIST has this argument in the JSON file:

        {
            "name": "client-id",
            "token": "ID",
            "type": "integer",
            "optional": true,
            "multiple": true,
            "since": "6.2.0"
        }

It is presented on the command web page like this:

CLIENT LIST [ TYPE normal | master | replica | pubsub ] [ ID client-id ] [ [ ID client-id ] ... ] 

Expected behaviour

The expected behaviour is that ID only appears once, e.g.

CLIENT LIST [TYPE <NORMAL | MASTER | REPLICA | PUBSUB>] [ID client-id [client-id...]]

Additional

There's an exception: If the argument has "multiple_token": true, then the token should actually be repeated. An example is the SORT command, which is already rendered correctly on the website, with GET get-pattern repeated as a whole:

SORT key [ BY by-pattern ] [ LIMIT offset count ] [ GET get-pattern ] [ [ GET get-pattern ] ... ] [ asc | desc ] [ sorting ] [ STORE destination ] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions