Skip to content

Instantly share code, notes, and snippets.

@shved
Created May 13, 2018 17:47
Show Gist options
  • Save shved/99ed618c718d64b2aeb75c42275755bf to your computer and use it in GitHub Desktop.
Save shved/99ed618c718d64b2aeb75c42275755bf to your computer and use it in GitHub Desktop.
.iex.exs
global_settings = "~/.iex.exs"
if File.exists?(global_settings), do: Code.require_file(global_settings)
Application.put_env(:elixir, :ansi_enabled, true)
IEx.configure(
colors: [
eval_result: [:cyan, :bright] ,
eval_error: [[:red, :bright, "\n▶▶▶\n"]],
eval_info: [:yellow, :bright ],
],
default_prompt: [
"\e[G", # cursor ⇒ column 1
:blue, "%prefix", :yellow, "|", :blue, "%counter", " ", :yellow, "▶", :reset
] |> IO.ANSI.format |> IO.chardata_to_string
)
alias MyApp.{Repo,User,Photo,Album}
[am] = Repo.all User
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment