Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
161a5acf
Commit
161a5acf
authored
Aug 01, 2014
by
Matt Stancliff
Committed by
antirez
Aug 26, 2014
Browse files
redis-cli: Add --no-raw option
Some people need formatted output even when they have no interactive tty. Fixes #760
parent
7693b84b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
161a5acf
...
@@ -731,6 +731,8 @@ static int parseOptions(int argc, char **argv) {
...
@@ -731,6 +731,8 @@ static int parseOptions(int argc, char **argv) {
config
.
auth
=
argv
[
++
i
];
config
.
auth
=
argv
[
++
i
];
}
else
if
(
!
strcmp
(
argv
[
i
],
"--raw"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--raw"
))
{
config
.
output
=
OUTPUT_RAW
;
config
.
output
=
OUTPUT_RAW
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"--no-raw"
))
{
config
.
output
=
OUTPUT_STANDARD
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"--csv"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--csv"
))
{
config
.
output
=
OUTPUT_CSV
;
config
.
output
=
OUTPUT_CSV
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"--latency"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--latency"
))
{
...
@@ -821,6 +823,7 @@ static void usage() {
...
@@ -821,6 +823,7 @@ static void usage() {
" -c Enable cluster mode (follow -ASK and -MOVED redirections).
\n
"
" -c Enable cluster mode (follow -ASK and -MOVED redirections).
\n
"
" --raw Use raw formatting for replies (default when STDOUT is
\n
"
" --raw Use raw formatting for replies (default when STDOUT is
\n
"
" not a tty).
\n
"
" not a tty).
\n
"
" --no-raw Force formatted output even when STDOUT is not a tty.
\n
"
" --csv Output in CSV format.
\n
"
" --csv Output in CSV format.
\n
"
" --latency Enter a special mode continuously sampling latency.
\n
"
" --latency Enter a special mode continuously sampling latency.
\n
"
" --latency-history Like --latency but tracking latency changes over time.
\n
"
" --latency-history Like --latency but tracking latency changes over time.
\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