Skip to content

Commit

Permalink
Specify multi-bulk delimiter via options
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Dec 15, 2010
1 parent 65add0a commit 28c07c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/redis-cli.c
Expand Up @@ -530,6 +530,10 @@ static int parseOptions(int argc, char **argv) {
i++;
} else if (!strcmp(argv[i],"--raw")) {
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")) {
sds version = cliVersion();
printf("redis-cli %s\n", version);
Expand Down Expand Up @@ -572,6 +576,7 @@ static void usage() {
" -r <repeat> Execute specified command N times\n"
" -n <db> Database number\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"
" --help Output this help and exit\n"
" --version Output version and exit\n"
Expand Down

0 comments on commit 28c07c7

Please sign in to comment.