]> gitweb.factorcode.org Git - factor.git/commitdiff
add mention of run-file to scripting cookbook
authorRaghu R <rraghu.11502@gmail.com>
Tue, 9 Aug 2022 15:52:43 +0000 (21:22 +0530)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 9 Aug 2022 16:17:19 +0000 (09:17 -0700)
basis/help/cookbook/cookbook.factor

index b6e3c74a444cc924a3b8191c0675902943584f47..e4b753a961e7203fe9051870e5eb1506cf505cc7 100644 (file)
@@ -190,6 +190,8 @@ ARTICLE: "cookbook-scripts" "Scripting cookbook"
 $nl
 "To run a script, simply pass it as an argument to the Factor executable:"
 { $code "./factor cleanup.factor" }
+"To test a script in the listener, you can use " { $link run-file } "." 
+$nl
 "The script may access command line arguments by inspecting the value of the " { $link command-line } " variable. It can also get its own path from the " { $link script } " variable."
 { $heading "Example: ls" }
 "Here is an example implementing a simplified version of the Unix " { $snippet "ls" } " command in Factor:"