From 08e1de1d5afffa5ceeac08549abb3a5debbbe7a4 Mon Sep 17 00:00:00 2001 From: Raghu R Date: Tue, 9 Aug 2022 21:22:43 +0530 Subject: [PATCH] add mention of run-file to scripting cookbook --- basis/help/cookbook/cookbook.factor | 2 ++ 1 file changed, 2 insertions(+) diff --git a/basis/help/cookbook/cookbook.factor b/basis/help/cookbook/cookbook.factor index b6e3c74a44..e4b753a961 100644 --- a/basis/help/cookbook/cookbook.factor +++ b/basis/help/cookbook/cookbook.factor @@ -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:" -- 2.34.1