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
28c07c7b
Commit
28c07c7b
authored
Dec 15, 2010
by
Pieter Noordhuis
Browse files
Specify multi-bulk delimiter via options
parent
65add0a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
28c07c7b
...
@@ -530,6 +530,10 @@ static int parseOptions(int argc, char **argv) {
...
@@ -530,6 +530,10 @@ static int parseOptions(int argc, char **argv) {
i
++
;
i
++
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"--raw"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--raw"
))
{
config
.
raw_output
=
1
;
config
.
raw_output
=
1
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-d"
)
&&
!
lastarg
)
{
sdsfree
(
config
.
mb_delim
);
config
.
mb_delim
=
sdsnew
(
argv
[
i
+
1
]);
i
++
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"-v"
)
||
!
strcmp
(
argv
[
i
],
"--version"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"-v"
)
||
!
strcmp
(
argv
[
i
],
"--version"
))
{
sds
version
=
cliVersion
();
sds
version
=
cliVersion
();
printf
(
"redis-cli %s
\n
"
,
version
);
printf
(
"redis-cli %s
\n
"
,
version
);
...
@@ -572,6 +576,7 @@ static void usage() {
...
@@ -572,6 +576,7 @@ static void usage() {
" -r <repeat> Execute specified command N times
\n
"
" -r <repeat> Execute specified command N times
\n
"
" -n <db> Database number
\n
"
" -n <db> Database number
\n
"
" -x Read last argument from STDIN
\n
"
" -x Read last argument from STDIN
\n
"
" -d <delimiter> Multi-bulk delimiter in for raw formatting (default:
\\
n)
\n
"
" --raw Use raw formatting for replies (default when STDOUT is not a tty)
\n
"
" --raw Use raw formatting for replies (default when STDOUT is not a tty)
\n
"
" --help Output this help and exit
\n
"
" --help Output this help and exit
\n
"
" --version Output version and exit
\n
"
" --version Output version and exit
\n
"
...
...
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