summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/birdc.c6
1 files 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();
}