]> Repositorios git - scryer-prolog.git/commitdiff
explain starting Scryer Prolog
authorMarkus Triska <[email protected]>
Fri, 22 Dec 2023 07:29:28 +0000 (08:29 +0100)
committerMarkus Triska <[email protected]>
Fri, 22 Dec 2023 07:36:29 +0000 (08:36 +0100)
README.md

index ce8f16bb3137fea0c25fc3e1d555e822e4fe4150..10358f21bb19d184b698a288b444f77fd0f7a823 100644 (file)
--- 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:
+
+<pre>
+scryer-prolog [OPTIONS] [FILES] [-- ARGUMENTS]
+</pre>
+
+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&nbsp;`argv/1`, which yields the list
+of arguments represented as strings.
+
+Prolog files can also be turned into *shell&nbsp;scripts* as explained in
+https://github.com/mthom/scryer-prolog/issues/2170#issuecomment-1821713993.
+
 ### Dynamic operators
 
 Scryer supports dynamic operators. Using the built-in