[master] dc360a4 Correct prompt when using heredoc
Federico G. Schwindt
fgsch at lodoss.net
Thu Apr 14 12:24:05 CEST 2016
commit dc360a451d54696e5b52ac254a5b5ff1b24c909a
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Wed Apr 13 00:46:59 2016 +0100
Correct prompt when using heredoc
Tested by scn. Fixes #1899.
diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index 621d696..9bd42f4 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("varnish> ", send_line);
+ rl_callback_handler_install("", 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("varnish> ", send_line);
+ rl_callback_handler_install("", send_line);
rl_attempted_completion_function = varnishadm_completion;
fds[0].fd = sock;
@@ -309,6 +309,7 @@ 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