Description
For clarity, I suggest that fixed tokens are capitalized in command syntax. This makes all fixed content of a command syntax render as capitalized (command name and tokens) and variable content as lowercase (key names, values, etc.).
For example, the type tokens of CLIENT LIST.
Current rendering:
CLIENT LIST [ TYPE normal | master | replica | pubsub ] [ ID client-id ] [ [ ID client-id ] ... ]
Expected rendering of the TYPE
argument (with normal, master, replica, pubsub capitalized):
[ TYPE <NORMAL | MASTER | REPLICA | PUBSUB> ]
Bonus: In this example, it would help to display the <
and >
around the arguments after the TYPE
token, to disambiguate the syntax. Otherwise, [ TYPE NORMAL | MASTER | REPLICA | PUBSUB ]
can be interpreted as TYPE NORMAL
or MASTER
or REPLICA
or PUBSUB
, i.e. as if the word "TYPE" is only included in TYPE NORMAL
but not in the others.
(This is how it's rendered on Redis website and our man pages btw.)
Details
The TYPE argument in CLIENT LIST has the JSON definition below.
Not that it is "optional" ([...]
around the whole arguemnt) and has type "oneof" (<...>
around the things that follow after TYPE
).
{
"token": "TYPE",
"name": "client-type",
"type": "oneof",
"optional": true,
"since": "5.0.0",
"arguments": [
{
"name": "normal",
"type": "pure-token",
"token": "normal"
},
{
"name": "master",
"type": "pure-token",
"token": "master"
},
{
"name": "replica",
"type": "pure-token",
"token": "replica"
},
{
"name": "pubsub",
"type": "pure-token",
"token": "pubsub"
}
]
},