Handbook
Glossary
load-vocab-roots ( -- )
Factor handbook
»
The language
»
Vocabulary loader
»
Vocabulary roots
»
Working with code outside of the Factor source tree
»
Additional vocabulary roots file
Vocabulary
command-line
Word description
Loads the newline-separated list of additional vocabulary roots from the file named
.factor-roots
.
Definition
USING:
io.encodings.utf8
io.files
kernel
namespaces
sequences
splitting
system
vocabs.loader
;
IN:
command-line
:
load-vocab-roots
( -- )
"user-init"
get
[
"~/.factor-roots"
[
utf8
file-lines
harvest
[
add-vocab-root
]
each
]
when-file-exists
"roots"
get
[
os
windows?
";"
":"
?
split
[
add-vocab-root
]
each
]
when*
]
when
;