Shell prompt

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Sat Sep 3 20:44:40 CEST 2005


> Well I hate to not really answer your question but, why is not having a 
> shell so important to this?  You are going to enter data and get data back 
> regardless so what differences does alittle prompt make?

It's a perfectly reasonable question to ask :-) The answer is quite long, so 
bear with me...

I need this for use with ErlIde. I had a requirement that the Erlang backend 
should not be distributed. This means the Java part can't be a hidden node, 
but must use rpc via a socket. All well and nice, but for the rpc mechanism 
isn't part of the distribution, so it has to be loaded into the runtime 
before use. The problem is that Eclipse plugins are jar archives, and the 
beam files are inside that archive. Erlang can't load them from there, so 
they have to be fed somehow in some other way. The solution I use is that I 
use the default console. It works fine, but when loading the bootstrapping 
code, the console displays spurious messages like {module, foo} and the 
first prompt is "4>" instead of "1>".

To get rid of those artifacts, I use the reshd package, starting a new shell 
to use, but then any erlang:display or error_logger output still goes to the 
default console. So I capture that output too - and guess what? After each 
such output there's still a "4>" (or similar)...

So instead of filtering it in a brutal way, I thought I'd ask if it can be 
removed in a clean manner.

Does that answer your question? :-)

regards,
Vlad



More information about the erlang-questions mailing list