Generic function
Completes a string based on a list of possible completions.
complete-from-sequence string possibilities delimiters
#key action predicate label-key value-key
=> string success object nmatches completions
<string>.
limited(<sequence>, of: <string>).
limited(<sequence>, of: <character>).
one-of(#"complete", #"complete-limited", #"complete-maximal", #"completions", #"apropos-completions"). Default value #"complete".
false-or(<function>). Default value #f.
<function>. Default value first.
<function>. Default value second.
false-or(<string>).
<boolean>.
<object>.
<integer>.
<sequence>.
duim-frames
duim-frames
Completes string chunk-wise against the list of possibilities, using the specified delimiters to break both string and the strings in possibilities into chunks.
The label-key and value-key arguments are used to extract the completion string and object from the entries in possibilities, and 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-sequence("s w ma",
#["one fish two fish",
"red fish blue fish",
"single white male",
"on beyond zebra"],
#[' ', '-'],
label-key: identity,
value-key: identity)