How to write a shell program in Erlang? -



How to write a shell program in Erlang? -

i want write shell in erlang. shell needs 1 line command user (stdin) , 1 line should editable. need provide history of commands user. illustration pressing arrow key user should see previous command. how can read 1 character in erlang , see if that's arrow key?

normally write shell have command terminal. , terminal-controlling functions platform-specific. illustration linux "tcgetattr", "tcsetattr" stdlib functions.

if want write terminal, have take at

"unix/linux programming. theory , practice", bruce molay. need chapter 5(about terminals)

take @ uart application , try follow advice

also can read erlang drivers(preferrable way) , erlang ports

by using drivers , ports, can extend erlang functionality doesn't have. (you can write them in c, ex)

you can read ports , drivers in "erlang programming"(francesco cesarini , simon thompson) chapter 16. can difference between ports , linked-in drivers there.

shell erlang

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -