summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2022-06-07 15:15:39 +0800
committerGitHub <noreply@github.com>2022-06-07 10:15:39 +0300
commit3d56f607b7083aff7606aeb19068d48f19a73059 (patch)
tree68f9e2da8f12b91e792cb6b102058faace8f884f /utils
parentb4772f63810de3099c3cfcb073c2041349f05fc1 (diff)
downloadredis-3d56f607b7083aff7606aeb19068d48f19a73059.tar.gz
Handle multiple_token flag in generate-command-help.rb (#10822)
Currently generate-command.help.rb dose not handle the multiple_token flag, handle this flag in this PR. The format is the same as redis-cli rendering. ```diff - bitfield_ro key GET encoding offset [encoding offset ...] + bitfield_ro key GET encoding offset [GET encoding offset ...] ``` Re run generate-command-code.py which was forget in #10820. Also change the flag value from string to bool, like "true" to true
Diffstat (limited to 'utils')
-rwxr-xr-xutils/generate-command-help.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/generate-command-help.rb b/utils/generate-command-help.rb
index 3ef00b3b5..1042ce6d2 100755
--- a/utils/generate-command-help.rb
+++ b/utils/generate-command-help.rb
@@ -45,7 +45,11 @@ def argument arg
name = arg["name"].is_a?(Array) ? arg["name"].join(" ") : arg["name"]
end
if arg["multiple"]
- name = "#{name} [#{name} ...]"
+ if arg["multiple_token"]
+ name = "#{name} [#{arg["token"]} #{name} ...]"
+ else
+ name = "#{name} [#{name} ...]"
+ end
end
if arg["token"]
name = [arg["token"], name].compact.join " "