2.4.2 Command line options for running Prolog
- --home=DIR
- Use DIR as home directory. See section 11.6 for details.
- --quiet
- Set the Prolog flag verbose
to
silent
, suppressing informational and banner messages. Also available as -q. - --nodebug
- Disable debugging. See the current_prolog_flag/2 flag generate_debug_info for details.
- --nosignals
- Inhibit any signal handling by Prolog, a property that is sometimes
desirable for embedded applications. This option sets the flag
signals to
false
. See section 11.4.21.1 for details. Note that the handler to unblock system calls is still installed. This can be prevented using--sigalert=0
additionally. See --sigalert. This flag also sets gc_thread tofalse
as synchronization with the garbage collect thread is based on signals. - --pldoc [=port]
- Start the PlDoc documentation system on a free network port and launch
the user's browser on
http://localhost:
port. If port is specified, the server is started at the given port and the browser is not launched. - --sigalert=NUM
- Use signal NUM (1 ... 31) for alerting a thread. This is
needed to make thread_signal/2,
and derived Prolog signal handling act immediately when the target
thread is blocked on an interruptable system call (e.g., sleep/1,
read/write to most devices). The default is to use
SIGUSR2
. If NUM is 0 (zero), this handler is not installed. - -tty
- Unix only. Switches controlling the terminal for allowing single-character commands to the tracer and get_single_char/1. By default, manipulating the terminal is enabled unless the system detects it is not connected to a terminal or it is running as a GNU-Emacs inferior process. See also tty_control.
- --win_app
- This option is available only in swipl-win.exe and is used for
the start-menu item. If causes plwin to start in the folder
...\My Documents\Prolog
or local equivalent thereof (see win_folder/2). TheProlog
subdirectory is created if it does not exist. - -O
- Optimised compilation. See current_prolog_flag/2 flag optimise for details.
- -l file
- Load file. This flag provides compatibility with some other Prolog systems.9YAP, SICStus It is used in SWI-Prolog to skip the program initialization specified using initialization/2 directives. See also section 2.10.2.1, and initialize/0.
- -s file
- Use file as a script file. The script file is loaded after the initialisation file specified with the -f file option. Unlike -f file, using -s does not stop Prolog from loading the personal initialisation file.
- -f file
- Use file as initialisation file instead of the default
.swiplrc
(Unix) orswipl.ini
(Windows). `-f none' stops SWI-Prolog from searching for a startup file. This option can be used as an alternative to -s file that stops Prolog from loading the personal initialisation file. See also section 2.2. - -F script
- Select a startup script from the SWI-Prolog home directory. The script
file is named
<script>.rc
. The default script name is deduced from the executable, taking the leading alphanumerical characters (letters, digits and underscore) from the program name. -F none stops looking for a script. Intended for simple management of slightly different versions. One could, for example, write a scriptiso.rc
and then select ISO compatibility mode usingpl -F iso
or make a link from iso-pl to pl. - -x bootfile
- Boot from bootfile instead of the system's default boot file. A boot file is a file resulting from a Prolog compilation using the -b or -c option or a program saved using qsave_program/[1,2].
- -p alias=path1[:path2 ... ]
- Define a path alias for file_search_path. alias is the name
of the alias, and arg path1 ... is a list of values for the alias. On
Windows the list separator is
. On other systems it is;
. A value is either a term of the form alias(value) or pathname. The computed aliases are added to file_search_path/2 using asserta/1, so they precede predefined values for the alias. See file_search_path/2 for details on using this file location mechanism.:
- --traditional
- This flag disables the most important extensions of SWI-Prolog versionĀ 7 (see section 5) that introduce incompatibilities with earlier versions. In particular, lists are represented in the traditional way, double quoted text is represented by a list of character codes and the functional notation on dicts is not supported. Dicts as a syntactic entity, and the predicates that act on them, are still supported if this flag is present.
- --
- Stops scanning for more arguments, so you can pass arguments for your application after this one. See current_prolog_flag/2 using the flag argv for obtaining the command line arguments.