Client: manipulate history only if interactive
This commit is contained in:
parent
05d47bd53e
commit
31874783c4
1 changed files with 4 additions and 2 deletions
|
@ -157,6 +157,7 @@ history_init(void)
|
||||||
void
|
void
|
||||||
input_init(void)
|
input_init(void)
|
||||||
{
|
{
|
||||||
|
if (interactive)
|
||||||
history_init();
|
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');
|
||||||
|
@ -235,6 +236,7 @@ cleanup(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
input_hide();
|
input_hide();
|
||||||
|
if (interactive)
|
||||||
write_history(history_file);
|
write_history(history_file);
|
||||||
rl_callback_handler_remove();
|
rl_callback_handler_remove();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue