ion 'rl_completion_matches()' uses an application-supplied "generator" function to generate the list of possible matches, and then returns the array of these matches. The caller should place the address of its generator function in 'rl_completion_entry_function'. 3. The generator function is called repeatedly from 'rl_completion_matches()', returning a string each time. The arguments to the generator function are TEXT and STATE. TEXT is the partial word to be completed. STATE is zero the first time the function is called, allowing the generator to perform any necessary initialization, and a positive non-zero integer for each subsequent call. The generator function returns '(char *)NULL' to inform 'rl_completion_matches()' that there are no more possibilities left. Usually the generator function computes the list of possible completions when STATE is zero, and returns them one at a time on subsequent calls. Each string the generator function returns as a match must be allocated with 'malloc()'; Readline frees the strings when it has finished with them. Such a generator function is referred to as an "application-specific completion function". -- Function: int rl_complete (int ignore, int invoking_key) Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see 'rl_completion_matches()'). The default is to do filename completion. -- Variable: rl_compentry_func_t * rl_completion_entry_function This is a pointer to the generator function for 'rl_completion_matches()'. If the value of 'rl_completion_entry_function' is 'NULL' then the default filename generator function, 'rl_filename_completion_function()', is used. An "application-specific completion function" is a function whose address is assigned to 'rl_completion_entry_function' and whose return values are used to generate possible completions.