grp = ec_completed_item_get_grp(item);
state = grp->state;
- ec_parsed_dump(stdout, ec_parsed_get_root(state));
for (state = grp->state; state != NULL;
state = ec_parsed_get_parent(state)) {
node = ec_parsed_get_node(state);
unsigned int count;
char **helps = NULL;
int match = 0;
+ int cols;
(void)ignore;
(void)invoking_key;
if (c == NULL)
goto fail;
- ec_completed_dump(stdout, c);
-
/* let's display one contextual help per node */
count = 0;
iter = ec_completed_iter(c,
ec_completed_iter_free(iter);
ec_completed_free(c);
- rl_display_match_list(helps, count + match, 1000); /* XXX 1000 */
+ /* ensure not more than 1 entry per line */
+ rl_get_screen_size(NULL, &cols);
+ rl_display_match_list(helps, count + match, cols);
rl_forced_update_display();
return 0;