Skip to content

Commit 81d0ba2

Browse files
committed
DOC: #793 clarify --home and the home Prolog flag
Explain what the home directory is used for (boot.prc, library/) and distinguish the two forms of --home: with =DIR sets the home directory (and adds SWI_HOME_DIR to the environment); without argument reports the located home directory. Cross-reference the --home option, the `home` Prolog flag, and the findhome section from each other. Update both the swipl(1) man page and the user manual.
1 parent 6a4c862 commit 81d0ba2

2 files changed

Lines changed: 26 additions & 9 deletions

File tree

man/overview.plx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,12 +426,12 @@ initialization/[1,2]. See also the Prolog flag
426426
\prologflag{debug_on_interrupt}.
427427
428428
\cmdlineoptionitem{--home[=DIR]}{}
429-
Use \arg{DIR} as home directory. See \secref{findhome} for details.
430-
If \arg{DIR} is omitted, the found location is printed and the process
431-
exits. If the location cannot be found an error is printed and the
432-
process exits with status~1. If the home directory is set using this
433-
option, the environment variable \const{SWI_HOME_DIR} holding the
434-
specified directory is added to the process.
429+
With \arg{DIR}, set SWI-Prolog's home directory to \arg{DIR} and add
430+
the environment variable \const{SWI_HOME_DIR} holding \arg{DIR} to the
431+
process. Without an argument, report the located home directory and
432+
exit; if the location cannot be found, print an error and exit with
433+
status~1. See \secref{findhome} for how the home directory is located
434+
and \prologflag{home} for what SWI-Prolog uses it for.
435435
436436
\cmdlineoptionitem{--quiet}{}
437437
\index{verbose}\index{quiet}%
@@ -1820,6 +1820,8 @@ its library as \file{<home>/library}. Some installations may put
18201820
architecture independent files in a \jargon{shared home} and also
18211821
define \prologflag{shared_home}. System files can be found using
18221822
absolute_file_name/3 as \term{swi}{file}. See file_search_path/2.
1823+
See \secref{findhome} for how this location is determined and
1824+
\cmdlineoption{--home} for setting or reporting it from the command line.
18231825
18241826
\prologflagitem{integer_rounding_function}{down,toward_zero}{r}
18251827
ISO Prolog flag describing rounding by \verb$//$ and \verb$rem$ arithmetic

src/swipl.1.in

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,25 @@ if Prolog was compiled for multi-threading and
147147
otherwise.
148148
.RE
149149
.TP
150-
.BI \-\-home= DIR
151-
Use
150+
.BI \-\-home\fR[= DIR ]
151+
SWI-Prolog uses its
152+
.I home directory
153+
to find its startup file as
154+
.IB <home> /boot.prc
155+
and its library as
156+
.IB <home> /library\fR.
157+
With
158+
.IR DIR ,
159+
set the home directory and add the environment variable
160+
.B SWI_HOME_DIR
161+
holding
152162
.I DIR
153-
as home directory.
163+
to the process.
164+
Without an argument, print the located home directory and exit; if the
165+
location cannot be found, print an error and exit with status 1.
166+
See also the
167+
.B home
168+
Prolog flag.
154169
.TP
155170
.BI \-\-stack\-limit= size [bkmg]
156171
Set the combined stack limit to

0 commit comments

Comments
 (0)