Generic function
Completes a string based on a generated list of completions.
complete-from-generator string generator delimiters
#key action predicate
=> string success object nmatches completions
<string>.
<function>.
limited(<sequence>, of: <character>).
one-of(#"complete", #"complete-limited", #"complete-maximal", #"completions", #"apropos-completions"). Default value #"complete".
false-or(<function>). Default value #f.
false-or(<string>).
<boolean>.
<object>.
<integer>.
<sequence>.
duim-frames
duim-frames
Completes string chunk-wise against a list of possibilities derived from generator, using the specified delimiters to break both string and the generated possibilities into chunks. This function is identical to complete-from-sequence, except that the list of possibilities is derived from the generator function, rather than passed explicitly. The generator is a function of two arguments: the string to be completed and a continuation co-routine to call that performs the completion. It should call the continuation with two arguments: the completion string and an object.
The argument predicate (if supplied) is applied to filter out unwanted objects.
The function returns five values: the completed string (if there is one), whether or not the completion successfully matched, the object associated with the completion, the number of things that matched, and (if action is #"completions") a sequence of possible completions.
The action argument can take any of the following values:
#"complete"
#"complete-limited"
#"complete-maximal"
#"completions" or #"apropos-completions" Returns a sequence of the possible completions.
complete-from-generator
("th", method (string, completer)
for (b in #["one", "two", "three", "four"])
completer(b, b)
end
end method, #[' ', '-'])