Created
March 3, 2017 06:29
-
-
Save am-kantox/b32ada39a5c944e456289e757ab47271 to your computer and use it in GitHub Desktop.
Fancy IEx config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IEx.configure colors: [enabled: true] | |
# IEx.configure colors: [eval_result: [:cyan, :bright]] | |
{fortune, 0} = System.cmd "fortune", [] # displays the fortune prompt | |
IO.puts IO.ANSI.red_background() <> IO.ANSI.white() <> "▷ #{fortune}" <> IO.ANSI.reset | |
Application.put_env(:elixir, :ansi_enabled, true) | |
IEx.configure( | |
colors: [ | |
eval_result: [:green, :bright] , | |
eval_error: [[:red, :bright, "\n▶▶▶\n"]], | |
eval_info: [:yellow, :bright ], | |
], | |
default_prompt: [ | |
"\e[G", # cursor ⇒ column 1 | |
:green, "%prefix", :white, "|", :green, "%counter", " ", :blue, "▶", :reset | |
] |> IO.ANSI.format |> IO.chardata_to_string | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment