summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Erik Rediger <janerik@fnordig.de>2017-01-08 18:27:00 +0100
committerantirez <antirez@gmail.com>2017-01-27 10:49:47 +0100
commit389b9f5945fa93ff63bc4368ea94f45608a79a89 (patch)
tree2858e3574377ff2134e4c3a6b8f9db7d6f01d7e4
parent1370a888878d8e27f262eff8d4e712dc2e6ca5a6 (diff)
downloadredis-389b9f5945fa93ff63bc4368ea94f45608a79a89.tar.gz
Initialize help only in repl mode
-rw-r--r--src/redis-cli.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 2a0d7495c..9c1de0a23 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -1271,6 +1271,11 @@ static void repl(void) {
int argc;
sds *argv;
+ /* Initialize the help and, if possible, use the COMMAND command in order
+ * to retrieve missing entries. */
+ cliInitHelp();
+ cliIntegrateHelp();
+
config.interactive = 1;
linenoiseSetMultiLine(1);
linenoiseSetCompletionCallback(completionCallback);
@@ -2601,11 +2606,6 @@ int main(int argc, char **argv) {
argc -= firstarg;
argv += firstarg;
- /* Initialize the help and, if possible, use the COMMAND command in order
- * to retrieve missing entries. */
- cliInitHelp();
- cliIntegrateHelp();
-
/* Latency mode */
if (config.latency_mode) {
if (cliConnect(0) == REDIS_ERR) exit(1);