From: Jan Moskyto Matejka Date: Tue, 16 May 2017 13:47:41 +0000 (+0200) Subject: Client: manipulate history only if interactive X-Git-Tag: v2.0.0~80^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31874783c44dd59c355921908016f9b42d22ef02;p=thirdparty%2Fbird.git Client: manipulate history only if interactive --- diff --git a/client/birdc.c b/client/birdc.c index 18e7c47b1..f1aea2fee 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(); }