[master] 8602c8a Revert recent heredoc handling change for now
Federico G. Schwindt
fgsch at lodoss.net
Tue Apr 19 14:20:07 CEST 2016
commit 8602c8a1a34931c1f5105fe360185cc61db7c415
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Tue Apr 19 13:14:01 2016 +0100
Revert recent heredoc handling change for now
Older libedit versions lack rl_set_prompt() and in some cases we ended
up with an empty prompt.
diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index 9bd42f4..621d696 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -191,7 +191,7 @@ static void send_line(char *l)
cli_write(_line_sock, l);
cli_write(_line_sock, "\n");
add_history(l);
- rl_callback_handler_install("", send_line);
+ rl_callback_handler_install("varnish> ", send_line);
} else {
RL_EXIT(0);
}
@@ -246,7 +246,7 @@ interactive(int sock)
unsigned u, status;
_line_sock = sock;
rl_already_prompted = 1;
- rl_callback_handler_install("", send_line);
+ rl_callback_handler_install("varnish> ", send_line);
rl_attempted_completion_function = varnishadm_completion;
fds[0].fd = sock;
@@ -309,7 +309,6 @@ interactive(int sock)
free(answer);
answer = NULL;
}
- rl_set_prompt("varnish> ");
rl_forced_update_display();
}
if (fds[1].revents & POLLIN) {
More information about the varnish-commit
mailing list