pretty printing depth in the erlang shell
Richard Carlsson
richardc@REDACTED
Wed May 18 11:06:50 CEST 2005
Thomas Johnsson XA (LN/EAB) wrote:
> Is there a way to increase the pretty printing depth in the erlang shell?
> It is rather tedious to have to write eg
> io:format("~p",[ ..whatever...]).
> to see it all....
Write a utility function and put in your user_default.erl. E.g.:
-module(user_default).
-compile(export_all).
...
fmt(Term, Depth) -> io:format("~P\n", [Term, Depth]).
fmp(Term) -> fmt(Term, 20).
...
(code not tested; adjust default depth to your preference).
Then you can use it in the shell; e.g.:
1> fmt(BigTerm).
/Richard
More information about the erlang-questions
mailing list