Handbook
Glossary
get-completions ( prefix -- completions )
Vocabulary
readline-listener
.
private
Inputs
prefix
an
object
Outputs
completions
an
object
Definition
USING:
combinators
kernel
readline
sequences
splitting
threads
tools.completion
;
IN:
readline-listener.private
:
get-completions
( prefix -- completions )
completions
tget
[
nip
]
[
completion-line
" \r\n"
split
{
{
[
dup
complete-vocab?
]
[
drop
prefixed-vocabs
]
}
{
[
dup
complete-char?
]
[
drop
prefixed-chars
]
}
{
[
dup
complete-color?
]
[
drop
prefixed-colors
]
}
{
[
dup
complete-editor?
]
[
drop
prefixed-editors
]
}
{
[
dup
complete-pathname?
]
[
drop
prefixed-paths
]
}
{
[
dup
complete-vocab-words?
]
[
harvest
second
prefixed-vocab-words
]
}
[
drop
prefixed-words
]
}
cond
dup
completions
tset
]
if*
;