Commit Graph

18 Commits

Author SHA1 Message Date
Binbin
3d56f607b7
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
2022-06-07 10:15:39 +03:00
Itamar Haber
3e09a8c097
Fixes commands' syntices (#10534)
Fixes in command argument in json files
* Fixes BITFIELD's syntax ("sub-commands" can be repeated, and OVERFLOW is only valid for SET and INCR)
* Improves readability of SET (reordered)
* Fixes GEOSEARCH and GEOSEARCH_RO syntices (use `oneof` for mutually exclusive group instead of `optional`)
* Fixes MIGRATE syntax (use `oneof` for mutually exclusive group instead of `optional`)
* Fixes MODULE LOADEX syntax (the `CONFIG` token should be repeated too when using multiple configs)

other:
* make generate-command-help.rb accept a path to commands.json, or read it from stdin (e.g. `generate-commands-json.py | generate-command-help.rb -`)
2022-04-06 09:33:33 +03:00
Oran Agra
c42b163332
fix file permissions for scripts in utils folder (#10241)
make sure the scripts are executable
2022-02-05 18:40:09 +02:00
Jason Elbaum
5b17909c4f
redis-cli generates command help tables from the results of COMMAND (#10043)
This is a followup to #9656 and implements the following step mentioned in that PR:

* When possible, extract all the help and completion tips from COMMAND DOCS (Redis 7.0 and up)
* If COMMAND DOCS fails, use the static help.h compiled into redis-cli.
* Supplement additional command names from COMMAND (pre-Redis 7.0)

The last step is needed to add module command and other non-standard commands.

This PR does not change the interactive hinting mechanism, which still uses only the param
strings to provide somewhat unreliable and inconsistent command hints (see #8084).
That task is left for a future PR. 

Co-authored-by: Oran Agra <oran@redislabs.com>
2022-02-05 16:54:16 +02:00
Yossi Gottlieb
068190a802
Update generate-command-help.rb and help.h. (#10196)
There are some inevitable changes between the old and new output, as a
result of the different `commands.json` semantics.
2022-01-27 21:48:06 +02:00
Itamar Haber
7c80a65484
Adds the "bitmap" category to redis-cli help(#9474) 2021-09-09 10:16:30 +03:00
Oran Agra
7b48de68ce
Remove useless - from help.h on commands with no arguments (#8939)
As far as i can tell it shows up in redis-cli in both HELP, e.g.
`help client list`, and also in the command completion tips, but it is
unclear what it was needed for.
It exists since the very first commit that added this mechanism.
2021-05-18 17:13:10 +03:00
Itamar Haber
d322e7baba
Adds support for nested args in cli's help (#8074)
See https://github.com/redis/redis-doc/pull/1443

Also allows nameless commands.
2020-11-30 15:00:16 +02:00
Oran Agra
9bbf768d3c
change references to the github repo location (#7479) 2020-07-10 08:25:26 +03:00
antirez
b2fc2eaecb Add the stream group to the script generating the help. 2018-06-07 18:52:01 +02:00
antirez
f3dd472e97 Update redis-cli help and the script to generate it. 2015-11-17 15:38:34 +01:00
Jan-Erik Rediger
ef57f94df0 Use correct github url to find commands.json
Once this is merged:
  - merge the latest changes to commands.json in antirez/redis-doc
  - re-run: utils/generate-command-help.rb > src/help.h

Then we'll have nice and easy tab-completed help in redis-cli again.

Closes #1909
2014-08-25 10:15:28 +02:00
antirez
9eeb03e5f7 generate-command-help.rb updated with new hyperloglog group. 2014-04-22 16:13:58 +02:00
antirez
1ad4d50805 redis-cli help.h updated. Script to generate it updated as well. 2012-04-03 15:30:33 +02:00
antirez
6418b4c790 help.h updated 2010-12-15 17:39:40 +01:00
Pieter Noordhuis
a2a69d5803 Refactor help-related code into redis-cli.c 2010-11-28 21:37:19 +01:00
Pieter Noordhuis
50d0e82d54 Update help.h generator script to output man-style argument list 2010-11-28 17:45:58 +01:00
Tj Holowaychuk
5397f2b596 Added redis-cli interactive help support
updated via commands.json in redis-doc repo. Currently
use `make src/help.h` to re-generate. The following
are valid from the REPL:

  help
  help [command]
  help [group]
  help groups

ex:

  help sort
  help hash
2010-11-16 05:50:26 -08:00