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
d239ec59
Commit
d239ec59
authored
Mar 04, 2010
by
antirez
Browse files
redis-cli now runs in interactive mode if no command is provided
parent
520b5a33
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis-cli.c
View file @
d239ec59
...
...
@@ -420,7 +420,7 @@ static void usage() {
fprintf
(
stderr
,
"example: cat /etc/passwd | redis-cli set my_passwd
\n
"
);
fprintf
(
stderr
,
"example: redis-cli get my_passwd
\n
"
);
fprintf
(
stderr
,
"example: redis-cli -r 100 lpush mylist x
\n
"
);
fprintf
(
stderr
,
"
\n
Run in interactive mode: redis-cli -i
\n
"
);
fprintf
(
stderr
,
"
\n
Run in interactive mode: redis-cli -i
or just don't pass any command
\n
"
);
exit
(
1
);
}
...
...
@@ -486,12 +486,10 @@ int main(int argc, char **argv) {
config
.
interactive
=
0
;
firstarg
=
parseOptions
(
argc
,
argv
);
argc
-=
firstarg
;
argv
+=
firstarg
;
if
(
config
.
interactive
==
1
)
repl
();
if
(
argc
<
1
)
usage
();
if
(
argc
==
0
||
config
.
interactive
==
1
)
repl
();
argvcopy
=
convertToSds
(
argc
,
argv
);
...
...
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