Jiang Xiang
Jiang Xiang

Reputation: 3256

how to set default folder in swi-prolog on mac

I want to set the default folder for programs in swi-prolog. I have noticed that I can change the personalization file '.plrc' in my home folder but I do not know the rules to edit this file.

Upvotes: 2

Views: 2313

Answers (1)

Paulo Moura
Paulo Moura

Reputation: 18683

Add to your .swiplrc file (.plrc file in old SWI-Prolog versions) an initialization/1 directive with a goal that changes the current directory to whatever you want. For example:

:- initialization(cd('$HOME/my_fancy_prolog_project')).

Upvotes: 4

Related Questions