[erlang-questions] update erlang shell prompt dynamically

wde wde@REDACTED
Sun Jul 29 14:19:01 CEST 2012


Hello,


I would like to use a custom prompt inside the erlang shell. 

To do it, I defined the following environment variable for stdlib : {shell_prompt_func,{my_module,my_prompt}}. It works fine !

In my prompt definition, I set the number of nodes inside the cluster.  The prompt is updated only when I type something in the shell.

¤ TOTO[titi@REDACTED](cluster_wait)::> blabla().
** exception error: undefined shell command blabla/0
¤ TOTO[titi@REDACTED]:3/3::>


How could I refresh the prompt when I push "enter" in the shell ?  I didn't find the trick.


Thank you for your help.


wde








More information about the erlang-questions mailing list