Skip to content

Instantly share code, notes, and snippets.

@blackode
Created April 6, 2020 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blackode/9195f94a400ba68721af86b550f6ceea to your computer and use it in GitHub Desktop.
Save blackode/9195f94a400ba68721af86b550f6ceea to your computer and use it in GitHub Desktop.
IEx default and continuation prompt
IEx.configure(
# This will display when we enter multi lines of code. I used 4 empty spaces.
# If you need you can update it with the unicode symbols you like
continuation_prompt: " ",
default_prompt:
[
# ANSI CHA, move cursor to column 1
"\e[G",
# This is default prefix like iex
# "%prefix",
# custom symbols if you need play with them
# "i👽x", "❯", ">",
:yellow,
# counter which helps us to reuse the previous results using v(counter)
"%counter. ",
:magenta,
# custome elixir symbol; I used "". You can update at the beginnning of
# this config
elixir_icon,
# this will reset previous color
: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