We use the extension ".lfe" for LFE files. Which extension, if any, should we use for LFE shell scripts?
It would only be a convention because I think when loading/running scripts we should give the whole name. We could have ".lfes" for an LFE script, or ".lsh" for LFE shell script (modelling sh)? Or perhaps do the same as sh and not have any convention at all? This would fit better in with having LFE scripts as executables.
One reason for my asking is that the question has arisen about how to allow the user to load a set of predefined shell functions. One simple way is to put them in an LFE shell script and do (run "script-file-name"). This way works but it is not automatic.
We are adding a mechanism similar to what the erlang shell does, it uses functions in the module user_default. But it would be nice to be able to run any shell commands as well, and to allow it to be different for different shells! One way would be to look for a default shell script file and load it.
There are many alternatives: we could load a "~/.lfeshrc"; or a local ".lfeshrc"; or a local "user_default.???"; or a combination of these.
I will have the user_default module method fixed in a few days in the develop branch. Ideas and suggestions welcome,
--
Robert
You received this message because you are subscribed to the Google Groups "Lisp Flavoured Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lisp-flavoured-e...@googlegroups.com.
To post to this group, send email to lisp-flavo...@googlegroups.com.
Visit this group at http://groups.google.com/group/lisp-flavoured-erlang.
For more options, visit https://groups.google.com/d/optout.
I like the default shell script idea! Since you can define functions in it, I think it'd be useful to source two different files; first ~/.lfe/whatever and then a local ./whatever.
The former is for my personal preferences and the latter could be distributed with the code. (This would make user_default pointless.)All the names of the files mentioned in the thread are correct-ish and I don't have a strong preference either way.
--
I wasn't aware of lcfg. I'll mess around with it later, but... I think these scripts should be normal LFE files, with the ability to use the defun macro, for instance.
--
Yeah, my bad for muddying the contextual waters -- lcfg is mostly LFE data (it does support *some* code evaluation). What we're talking about in this thread is very different that configuration; essentially the code that one would write in a REPL.d
On Thu, Feb 12, 2015 at 4:06 PM, Mason Staugler <ma...@staugler.net> wrote:
I wasn't aware of lcfg. I'll mess around with it later, but... I think these scripts should be normal LFE files, with the ability to use the defun macro, for instance.
--
You received this message because you are subscribed to the Google Groups "Lisp Flavoured Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lisp-flavoured-erlang+unsub...@googlegroups.com.
To post to this group, send email to lisp-flavoured-erlang@googlegroups.com.