From 127a5086a921c963ff8707f9d4c91ded61fe22e9 Mon Sep 17 00:00:00 2001 From: Giftpflanze Date: Sat, 24 Feb 2024 11:18:31 +0100 Subject: [PATCH] Make -roots= known to the documentation --- basis/command-line/command-line-docs.factor | 1 + core/vocabs/loader/loader-docs.factor | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/basis/command-line/command-line-docs.factor b/basis/command-line/command-line-docs.factor index 71e139a30a..22c9d2c3be 100644 --- a/basis/command-line/command-line-docs.factor +++ b/basis/command-line/command-line-docs.factor @@ -95,6 +95,7 @@ ARTICLE: "standard-cli-args" "Command line switches for general usage" { { $snippet "-e=" { $emphasis "code" } } { "This specifies a code snippet to evaluate and then exit Factor." } } { { $snippet "-run=" { $emphasis "vocab" } } { { $snippet { $emphasis "vocab" } } " is the name of a vocabulary with a " { $link POSTPONE: MAIN: } " hook to run on startup, for example " { $vocab-link "listener" } " or " { $vocab-link "ui.tools" } "." } } { { $snippet "-no-user-init" } { "Inhibits the running of user initialization files on startup. See " { $link "rc-files" } "." } } + { { $snippet "-roots=" { $emphasis "paths" } } { "Specify additional vocabulary roots. The list is colon-separated on Unix and semicolon-separated on Windows." } } } ; ARTICLE: ".factor-boot-rc" "Bootstrap initialization file" diff --git a/core/vocabs/loader/loader-docs.factor b/core/vocabs/loader/loader-docs.factor index bff9ada6c3..b9962c152e 100644 --- a/core/vocabs/loader/loader-docs.factor +++ b/core/vocabs/loader/loader-docs.factor @@ -5,11 +5,13 @@ IN: vocabs.loader ARTICLE: "add-vocab-roots" "Working with code outside of the Factor source tree" "You can work with code outside of the Factor source tree by adding additional directories to the list of vocabulary roots." $nl -"There are three ways of doing this." +"There are four ways of doing this:" $nl "The first way is to use an environment variable. Factor looks at the " { $snippet "FACTOR_ROOTS" } " environment variable for a list of " { $snippet ":" } "-separated paths (on Unix) or a list of " { $snippet ";" } "-separated paths (on Windows)." $nl -"The second way is to create a configuration file. You can list additional vocabulary roots in a file that Factor reads at startup:" +"The second way is to use the " { $snippet "-roots=" } " command-line argument. The format is the same as for the environment variable." +$nl +"The third way is to create a configuration file. You can list additional vocabulary roots in a file that Factor reads at startup:" { $subsections ".factor-roots" } "Finally, you can add vocabulary roots by calling a word from your " { $snippet ".factor-rc" } " file (see " { $link ".factor-rc" } "):" { $subsections add-vocab-root } ; -- 2.34.1