1 ! Copyright (C) 2011 Erik Charlebois.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays help.markup help.syntax math
4 sequences.private vectors strings kernel math.order layouts
5 quotations generic.single ;
13 { $description "Read a line from using readline." } ;
17 { "quot" "a quotation with stack effect ( str n -- str )"}
19 { $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 " { $snippet "f" } " terminates the loop." }
21 { $example "USING: readline sequences combinators kernel ;"
22 "[ nip [ \"keep\" \"dip\" ] ?nth ] set-completion"
27 ARTICLE: "readline" "Readline"
28 { $vocab-link "readline" }