Handbook
Glossary
readline-listener ( -- )
Vocabulary
readline-listener
Word description
Invokes a listener that uses libreadline for editing, history and word completion.
Definition
USING:
combinators
io
io.streams.256color
io.streams.ansi
kernel
listener
readline
readline-listener.private
sequences
terminfo
ui.theme
ui.theme.switching
ui.tools.listener.history
;
IN:
readline-listener
:
readline-listener
( -- )
[
swap
get-completions
?nth
[
clear-completions
f
]
unless*
]
set-completion
history-file
[
dark-theme
switch-theme-if-default
[
readline-reader
new
[
listener-main
]
with-input-stream*
]
{
{
[
tty-supports-256color?
]
[
with-256color
]
}
{
[
tty-supports-ansicolor?
]
[
with-ansi
]
}
[
call
]
}
cond
]
with-history
;