[erlang-questions] erlang 21

zxq9@REDACTED zxq9@REDACTED
Sat Jul 7 13:21:30 CEST 2018


On 2018年7月7日土曜日 20時12分58秒 JST zxq9@REDACTED wrote:
> Those usability improvements have already been made:
> 
>   ^G
> Gets you to JCL mode. All Erlangers should be familiar with this. If you're
> not, then read up on it and play around. Not much to learn.
> 
>   restricted shell
> This is the real life saver: picking what commands are allowed to be run by
> a user. This gives you a LOT more flexibility and than merely making things
> like q() and exit() more special than they already are.
> 
>   customized shell over SSH
> Even more freedom than a restricted shell definition. You can write some
> really awesome remote tools this way (or an entire MUD interface...).
>       
> 
> halt() and init:stop() are system calls and really shouldn't be the subject
> of any human's habit-forming behaviors.
> 
> IMO this is a case of the humans ignoring the tools that have been made
> available -- making similar things available under different names is not
> likely to help.

I hate to be the guy to sound preachy without providing a solution, so here
are links to the relevant parts of the docs for those who aren't sure where
to look to find all the magic.
(I remember the docs being a bit daunting when I returned to Erlang...)

Here are some useful spots to read up on and bookmark. Even if you don't
make much use of this stuff any time soon, knowing it is available tends to
lead to better results.

Erlang shell docs:
http://erlang.org/doc/man/shell.html

Shell docs section on JCL mode (you should be familiar with this):
http://erlang.org/doc/man/shell.html#jcl-mode

Section on restricted mode:
http://erlang.org/doc/man/shell.html#restricted-shell

The coolest thing ever -- defining your own shell commands and behavior:
http://erlang.org/doc/man/shell_default.html

SSH app (amazing things can be done with this):
http://erlang.org/doc/man/SSH_app.html

-Craig



More information about the erlang-questions mailing list