Commit 31874783 authored by Jan Moskyto Matejka's avatar Jan Moskyto Matejka

Client: manipulate history only if interactive

parent 05d47bd5
...@@ -157,7 +157,8 @@ history_init(void) ...@@ -157,7 +157,8 @@ history_init(void)
void void
input_init(void) input_init(void)
{ {
history_init(); if (interactive)
history_init();
rl_readline_name = "birdc"; rl_readline_name = "birdc";
rl_add_defun("bird-complete", input_complete, '\t'); rl_add_defun("bird-complete", input_complete, '\t');
rl_add_defun("bird-help", input_help, '?'); rl_add_defun("bird-help", input_help, '?');
...@@ -235,6 +236,7 @@ cleanup(void) ...@@ -235,6 +236,7 @@ cleanup(void)
return; return;
input_hide(); input_hide();
write_history(history_file); if (interactive)
write_history(history_file);
rl_callback_handler_remove(); rl_callback_handler_remove();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment