[master] 0cc4adf Do not add empty strings to the cli history
Federico G. Schwindt
fgsch at lodoss.net
Tue Apr 19 14:20:07 CEST 2016
commit 0cc4adf09ba64928a7fbb94f6c246533a2996427
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Tue Apr 19 13:16:23 2016 +0100
Do not add empty strings to the cli history
diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index 621d696..e426f0b 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -190,7 +190,8 @@ static void send_line(char *l)
if (l) {
cli_write(_line_sock, l);
cli_write(_line_sock, "\n");
- add_history(l);
+ if (*l)
+ add_history(l);
rl_callback_handler_install("varnish> ", send_line);
} else {
RL_EXIT(0);
More information about the varnish-commit
mailing list