Is it possible to colorize typing into elixir interactive shell (iex) ?
iex [21:13 :: 2] > quote do: 1 + 2
{:+, [context: Elixir, import: Kernel], [1, 2]}
So, this part
quote do: 1 + 2
is always white (I cannot set different color for quote or do: ). All others can be colored using .iex.exs config file.
Elixir 和 Erlang shell 都不支持对动态输入进行着色,因此当前实现无法实现您想要实现的目标。
I know this is an old question, but I'll post this anyway for folks from the future.
iex> Application.put_env(:elixir, :ansi_enabled, true) // turn colors ON
// OR
iex> Application.put_env(:elixir, :ansi_enabled, false) // turn colors OFF
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.