Skip to content

Commit

Permalink
redis-cli: Add --no-raw option
Browse files Browse the repository at this point in the history
Some people need formatted output even when they have no
interactive tty.

Fixes #760
  • Loading branch information
mattsta committed Aug 1, 2014
1 parent 19b5997 commit f2252d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/redis-cli.c
Expand Up @@ -731,6 +731,8 @@ static int parseOptions(int argc, char **argv) {
config.auth = argv[++i];
} else if (!strcmp(argv[i],"--raw")) {
config.output = OUTPUT_RAW;
} else if (!strcmp(argv[i],"--no-raw")) {
config.output = OUTPUT_STANDARD;
} else if (!strcmp(argv[i],"--csv")) {
config.output = OUTPUT_CSV;
} else if (!strcmp(argv[i],"--latency")) {
Expand Down Expand Up @@ -821,6 +823,7 @@ static void usage() {
" -c Enable cluster mode (follow -ASK and -MOVED redirections).\n"
" --raw Use raw formatting for replies (default when STDOUT is\n"
" not a tty).\n"
" --no-raw Force formatted output even when STDOUT is not a tty.\n"
" --csv Output in CSV format.\n"
" --latency Enter a special mode continuously sampling latency.\n"
" --latency-history Like --latency but tracking latency changes over time.\n"
Expand Down

0 comments on commit f2252d1

Please sign in to comment.