diff options
Diffstat (limited to 'src/redis-cli.c')
-rw-r--r-- | src/redis-cli.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c index eef5ad1e0..5f01a936e 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -44,6 +44,7 @@ #include "sds.h" #include "zmalloc.h" #include "linenoise.h" +#include "help.h" #define REDIS_NOTUSED(V) ((void) V) @@ -252,22 +253,6 @@ static int cliReadReply() { return REDIS_OK; } -static void showInteractiveHelp(void) { - printf( - "\n" - "Welcome to redis-cli " REDIS_VERSION "!\n" - "Just type any valid Redis command to see a pretty printed output.\n" - "\n" - "It is possible to quote strings, like in:\n" - " set \"my key\" \"some string \\xff\\n\"\n" - "\n" - "You can find a list of valid Redis commands at\n" - " http://code.google.com/p/redis/wiki/CommandReference\n" - "\n" - "Note: redis-cli supports line editing, use up/down arrows for history." - "\n\n"); -} - static int cliSendCommand(int argc, char **argv, int repeat) { char *command = argv[0]; size_t *argvlen; @@ -275,7 +260,7 @@ static int cliSendCommand(int argc, char **argv, int repeat) { config.raw_output = !strcasecmp(command,"info"); if (!strcasecmp(command,"help")) { - showInteractiveHelp(); + output_help(--argc, ++argv); return REDIS_OK; } if (!strcasecmp(command,"shutdown")) config.shutdown = 1; |