Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4eb3b3e9
Commit
4eb3b3e9
authored
Feb 22, 2012
by
antirez
Browse files
Redis-cli should accept help command even if there is no connection to the server.
parent
fcdeb985
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
4eb3b3e9
...
...
@@ -501,6 +501,11 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
size_t
*
argvlen
;
int
j
,
output_raw
;
if
(
!
strcasecmp
(
command
,
"help"
)
||
!
strcasecmp
(
command
,
"?"
))
{
cliOutputHelp
(
--
argc
,
++
argv
);
return
REDIS_OK
;
}
if
(
context
==
NULL
)
return
REDIS_ERR
;
output_raw
=
0
;
...
...
@@ -515,10 +520,6 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
output_raw
=
1
;
}
if
(
!
strcasecmp
(
command
,
"help"
)
||
!
strcasecmp
(
command
,
"?"
))
{
cliOutputHelp
(
--
argc
,
++
argv
);
return
REDIS_OK
;
}
if
(
!
strcasecmp
(
command
,
"shutdown"
))
config
.
shutdown
=
1
;
if
(
!
strcasecmp
(
command
,
"monitor"
))
config
.
monitor_mode
=
1
;
if
(
!
strcasecmp
(
command
,
"subscribe"
)
||
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment