set-completion ( quot -- )
Readline

Prev:readline ( prompt -- str )


Vocabulary
readline

Inputs
quota quotation with stack effect ( str n -- str )


Outputs
None

Word description
Set the given quotation as the completion hook for readline. The quotation is called with the string to complete and the index in the completion list to return. When all completions have been returned, returning f terminates the loop.

Examples
USING: readline sequences combinators kernel ; [ nip [ "keep" "dip" ] ?nth ] set-completion


Definition