Skip to content

Commit d2c5fa3

Browse files
committed
Moduledoc for IEx.Options
1 parent a8d9ad5 commit d2c5fa3

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

lib/iex/lib/iex/options.ex

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
defmodule IEx.Options do
22
@moduledoc """
33
Provides an interface for adjusting options of the running IEx session.
4+
5+
Changing options is usually done inside an IEx session or in your .iex file.
6+
See `h(IEx)` for more info on the latter.
7+
8+
If the value of an option is a keyword list, only those keys that are
9+
mentioned will be changed. The rest of the sub-options will keep their
10+
current values.
11+
12+
To get the list of all supported options, use `list/0`. You can also get an
13+
option's description using `print_help/1`.
14+
15+
## Examples
16+
17+
iex(1)> ArgumentError[]
18+
ArgumentError[message: "argument error"]
19+
20+
iex(2)> IEx.Options.set :inspect, raw: true
21+
[limit: 50, raw: false]
22+
23+
iex(3)> ArgumentError[]
24+
{ArgumentError,:__exception__,"argument error"}
25+
26+
iex(4)> IEx.Options.list
27+
[:colors,:inspect]
28+
29+
iex(5)> IEx.Options.print_help :colors
30+
This is an aggregate option that encapsulates all color settings used
31+
by the shell.
32+
... # omitted content
33+
434
"""
535

636
@supported_options [

0 commit comments

Comments
 (0)