rl_completion_matches#

Build the list of completions for $text by calling a generator repeatedly. Returns the matches.

The generator is called as $fn->($text, $state), with $state zero on the first call and non-zero on every call after it, and returns one match each time or undef once it is exhausted. Omitting $fn uses whatever $attribs{completion_entry_function} currently holds.

A generator passed here is in force for the duration of this call only: whatever completion function $attribs held is put back afterwards, so a one-off generator cannot disturb it.