   """
   def get(name)
 
-  defget :colors
-  defget :inspect, :inspect_opts
-  defget :history_size
+  keys = [ colors: :colors,
+           inspect: :inspect_opts,
+           history_size: :history_size ]
+
+  Enum.each keys, fn { key, env } ->
+    def get(unquote(key)) do
+      { :ok, value } = :application.get_env(:iex, unquote(env))
+      value
+    end
+  end
 
   def get(name) do
     raise_option(name)

defmodule IEx.Options.Helper do
  @moduledoc false

  defmacro defget(opt_name, env_var_name // nil) do
    env_var_name = env_var_name || opt_name
    quote do
      def get(unquote(opt_name)) do
        { :ok, value } = :application.get_env(:iex, unquote(env_var_name))
        value
      end
    end
  end
end

defmodule IEx.Options do
  @moduledoc """
  Provides an interface for adjusting options of the running IEx session.

  Returns all supported options as a list of names.
  """
  def list() do
    @supported_options
  end

  @doc """
