Skip to content

Commit

Permalink
redisx-cli small JSON output tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Dec 13, 2024
1 parent 1ce5262 commit e5ceff4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/redisx-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static void process(Redis *redis, const char *prefix, const char **cmdargs, int
static void PushProcessor(RedisClient *cl, RESP *resp, void *ptr) {
(void) cl;
(void) ptr;
printRESP("[PUSH]", resp);
printRESP("PUSH", resp);
}

static int interactive(Redis *redis) {
Expand All @@ -64,7 +64,7 @@ static int interactive(Redis *redis) {

if(args) {
if(nargs > 0) {
process(redis, "[REPLY]", (const char **) args, nargs);
process(redis, "REPLY", (const char **) args, nargs);
add_history(line);
}
free(args);
Expand Down Expand Up @@ -216,7 +216,7 @@ int main(int argc, const char *argv[]) {
nanosleep(&sleeptime, NULL);
}

if(nargs) process(redis, "[REPLY]", (const char **) cmdargs, nargs);
if(nargs) process(redis, "REPLY", (const char **) cmdargs, nargs);
}

redisxDisconnect(redis);
Expand Down
2 changes: 1 addition & 1 deletion src/resp.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ static int rPrintRESP(int indent, const RESP *resp) {
int pos = indent;
if(i) rIndentLine(indent);
pos += printf("%*d) ", w, (i + 1));
rPrintRESP(pos, component[i]);
pos += rPrintRESP(pos, component[i]);
if(i + 1 < resp->n) printf("\n");
}
}
Expand Down

0 comments on commit e5ceff4

Please sign in to comment.