Skip to content

Commit d9a1084

Browse files
committed
Mention IEx.Options in IEx's doc
1 parent d159e4f commit d9a1084

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/iex/lib/iex.ex

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,30 @@ defmodule IEx do
9090
It is possible to override the default loading sequence for .iex file by
9191
supplying the --dot-iex option to iex. See `iex --help`.
9292
93+
## Configuring the shell
94+
95+
There is a number of customization options provided by the shell. Take a look
96+
at the docs for the `IEx.Options` module.
97+
98+
The main functions there are `IEx.Options.get/1` and `IEx.Options.set/2`. One
99+
can also use `IEx.Options.list/0` to get the list of all supported options.
100+
`IEx.Options.print_help/1` will print documentation for the given option.
101+
102+
In particular, it might be convenient to customize those options inside your
103+
.iex file like this:
104+
105+
# .iex
106+
IEx.Options.set :inspect, limit: 3
107+
108+
### now run the shell ###
109+
110+
$ iex
111+
Erlang R16B (erts-5.10.1) [...]
112+
113+
Interactive Elixir (0.9.1.dev) - press Ctrl+C to exit (type h() ENTER for help)
114+
iex(1)> [1,2,3,4,5]
115+
[1,2,3,...]
116+
93117
## Expressions in IEx
94118
95119
As an interactive shell, IEx evaluates expressions. This has some

0 commit comments

Comments
 (0)