The help command triggered by '?' keeps the message in readline buffer,
so it could be edited. For noninteractive shell it leads to an unexpected
side effect that `echo <cmd> ? | birdc` executes the command <cmd> after
showing its help. Avoid this by clearing the readline buffer in such case.
input_start_list();
cmd_help(rl_line_buffer, rl_point);
rl_undo_command(1, 0);
+ /* <cmd> ? is "internal". Do not submit command in non interactive session */
+ if (!interactive)
+ rl_replace_line("", 0);
input_stop_list();
return 0;
}