[erlang-questions] Some ideas for the shell.

Richard Carlsson carlsson.richard@REDACTED
Thu Dec 7 10:23:02 CET 2017

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.


2017-12-07 2:23 GMT+01:00 Richard A. O'Keefe <ok@REDACTED>:

> On 6/12/17 1:59 AM, Richard Carlsson wrote:
>> You also have file:eval/1 and file:script/1. (And "path_..." versions of
>> the same.)
> Yes, but file:eval/1 does something *DIFFERENT* from what
> the shell command include/1 would.  And so does file:/script/1.
> There is much overlap, but they are not the same.
> If the argument is to use one of those functions, that won't fly.
> If the argument is to use the *name* eval/1 or script/1 in the
> shell for what I want include/1 to do, yeah, sure, why not?
> You see, the thing is that include/1 is supposed to read a sequence
> of full-stop-terminated forms from the named file, and process them
> *as shell commands*, some of which are normal Erlang expressions,
> and some of which are *not*.  I mean, I did know about file:eval/1
> (but admittedly not file:script/1) and there's a reason I wanted
> something else...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171207/47b5b1fc/attachment.htm>

More information about the erlang-questions mailing list