[erlang-questions] update erlang shell prompt dynamically

wde <>
Sun Jul 29 14:19:01 CEST 2012


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[](cluster_wait)::> blabla().
** exception error: undefined shell command blabla/0
¤ TOTO[]: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.


More information about the erlang-questions mailing list