Re: Warning: argument option processing changes

Michael Hendricks <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAFHuXuYc+nqjNjs+jacCf2AvYWfhQ-=4jCfmyAyu=hSs6kQfEA@mail.gmail.com>
On Mon, Sep 2, 2013 at 1:22 AM, Jan Wielemaker <[email protected]> wrote:

> The
> most portable way is simply
>
> #!/path/to/swipl
> <script>
>
> and do all the rest using directives.  For example:
>
> --- t.pl ---
> #!/home/jan/bin/swipl
>
> :- set_prolog_flag(verbose, silent).
>
> :- initialization main.
>
> main :-
>         current_prolog_flag(argv, Argv),
>         format('Called with ~q~n', [Argv]),
>         halt.
> --- end of t.pl ---
>
> % ./t.pl hello world
> Called with [hello,world]
>

How does a script portably prevent a user's initialization file from
loading?  On OS X, changing the shebang line to "#!/path/to/swipl -f none"
works, but doing so on Linux causes t.pl to display SWI Prolog's help text.
 I've found no flag equivalent to "-f none".

-- 
Michael
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.