[erlang-questions] shell io dialogues

Joe Armstrong erlang@REDACTED
Sun Feb 26 20:32:09 CET 2012


Hi,

Has anybody written any code that makes inputting data from the shell
less painful?

Id like to say something like

   Val = xxx:read_integer([{prompt,'Port
number:'},{expect,integer,1000,2000},{default,1234}, ....

 I'd like to customize what happens if the user does not enter an
integer etc. (ie ask again, abort, etc.)

  also read_enumerated([....., {expect, ["foo","bar",friends"]} ,,,,

  (this would only accept one of the three strings in the command and
give me tab completion etc.)

I'd like to make a text interface that asks questions, and takes
reasonable actions if the user enters
bad data, without writing zillions of lines of code. Any pointers?

Cheers

/Joe



More information about the erlang-questions mailing list