<div dir="ltr">Apparently, path_eval/1 is also what Erlang ends up using to execute your ~/.erlang file if you have one (via the undocumented c:erlangrc/0). There doesn't seem to be a way to run a script in the context of the shell.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br> /Richard</div></div>
<br><div class="gmail_quote">2017-12-07 2:23 GMT+01:00 Richard A. O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz" target="_blank">ok@cs.otago.ac.nz</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 6/12/17 1:59 AM, Richard Carlsson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You also have file:eval/1 and file:script/1. (And "path_..." versions of<br>
the same.)<br>
</blockquote>
<br></span>
Yes, but file:eval/1 does something *DIFFERENT* from what<br>
the shell command include/1 would. And so does file:/script/1.<br>
There is much overlap, but they are not the same.<br>
If the argument is to use one of those functions, that won't fly.<br>
If the argument is to use the *name* eval/1 or script/1 in the<br>
shell for what I want include/1 to do, yeah, sure, why not?<br>
<br>
You see, the thing is that include/1 is supposed to read a sequence<br>
of full-stop-terminated forms from the named file, and process them<br>
*as shell commands*, some of which are normal Erlang expressions,<br>
and some of which are *not*. I mean, I did know about file:eval/1<br>
(but admittedly not file:script/1) and there's a reason I wanted<br>
something else...<br>
<br>
</blockquote></div><br></div>