From bcfdc812f9deae468e105e822ac0af5645f00255 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Fri, 22 Dec 2023 08:29:28 +0100 Subject: [PATCH] explain starting Scryer Prolog --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index ce8f16bb..10358f21 100644 --- a/README.md +++ b/README.md @@ -316,6 +316,35 @@ To quit Scryer Prolog, use the standard predicate `halt/0`: ?- halt. ``` +### Starting Scryer Prolog + +Scryer Prolog can be started from the command line by specifying +options, files and additional arguments. All components are optional: + +
+scryer-prolog [OPTIONS] [FILES] [-- ARGUMENTS]
+
+ +The supported options are: + +``` + -h, --help Display help message + -v, --version Print version information and exit + -g, --goal GOAL Run the query GOAL after consulting files + -f Fast startup. Do not load initialization file (~/.scryerrc) + --no-add-history Prevent adding input to history file (~/.scryer_history) +``` + +All specified Prolog files are consulted. + +After Prolog files, application-specific arguments can be specified on +the command line. These arguments can be accessed from within Prolog +applications with the predicate `argv/1`, which yields the list +of arguments represented as strings. + +Prolog files can also be turned into *shell scripts* as explained in +https://github.com/mthom/scryer-prolog/issues/2170#issuecomment-1821713993. + ### Dynamic operators Scryer supports dynamic operators. Using the built-in -- 2.54.0