From 31874783c44dd59c355921908016f9b42d22ef02 Mon Sep 17 00:00:00 2001 From: Jan Moskyto Matejka Date: Tue, 16 May 2017 15:47:41 +0200 Subject: [PATCH] Client: manipulate history only if interactive --- client/birdc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/birdc.c b/client/birdc.c index 18e7c47b..f1aea2fe 100644 --- a/client/birdc.c +++ b/client/birdc.c @@ -157,7 +157,8 @@ history_init(void) void input_init(void) { - history_init(); + if (interactive) + history_init(); rl_readline_name = "birdc"; rl_add_defun("bird-complete", input_complete, '\t'); rl_add_defun("bird-help", input_help, '?'); @@ -235,6 +236,7 @@ cleanup(void) return; input_hide(); - write_history(history_file); + if (interactive) + write_history(history_file); rl_callback_handler_remove(); }