Ehelper: Accessing Erlang documention from IEx

For your document viewing pleasure:

 iex(6)> e :erlang.term_to_binary/1


 term_to_binary(Term) -> ext_binary()


 Term = term()

 Returns a binary data object that is the result of encoding Term according to
 the Erlang external term format.

 This can be used for various purposes, for example, writing a term to a file in
 an efficient way, or sending an Erlang term to some type of communications
 channel not supported by distributed Erlang.

 See also binary_to_term/1.


Heh, cool. :slight_smile:

This is super helpful. I am often stumped when working with some library that is built in Erlang that viewing the documentation cannot be done from the shell. :heart:

It will only work for stuff in the standard library for Erlang, since it requires a man page in the format created by the stdlib xml to man program that is installed in the standard place. It’s an awful hack, I’m surprised it works as well as it does.

1 Like