This enables users of the i9e API to open the i9e subsystem with
a producer already attached to the stdout buffer tree node of the
i9e subsystem.
if (ici->history_file)
read_history(ici->history_file);
update_winsize();
- rl_callback_handler_install(i9ep->ici->prompt, i9e_line_handler);
+ if (ici->producer) {
+ rl_callback_handler_install("", i9e_line_handler);
+ i9e_attach_to_stdout(ici->producer);
+ } else
+ rl_callback_handler_install(i9ep->ici->prompt, i9e_line_handler);
return 1;
}
* completer if the cursor is not on the first word.
*/
struct i9e_completer *completers;
+ /**
+ * If non-NULL, this node is attached immediately to the stdout btr
+ * node of the i9e subsystem.
+ */
+ struct btr_node *producer;
};
int i9e_open(struct i9e_client_info *ici, struct sched *s);