fcbry
How to configure iex behavior in Elixir release?
Long story short, huge domain name, non erlang users. Want to shrink down the width of the prompt as it’s making it difficult for users to enter commands and I’m trying to make the experience as pleasant as possible for them.
I can run the following in IEx and get rid of the hostname info:
Application.put_all_env(
iex: [
inspect: [pretty: true],
alive_prompt: "%counter>",
history_size: 20,
colors: [],
default_prompt: "%counter)>"
]
)
I’ve tried adding similar commands into runtime.exs, well that and :
config :iex,
inspect: [pretty: true],
alive_prompt: "%counter>",
history_size: 20,
colors: [],
default_prompt: "%counter)>"
But in both cases, crash at startup with the following kind of message:
ERROR! Config provider Config.Reader failed with:
** (exit) exited in: GenServer.call(IEx.Config, {:update, {IEx.Config, :handle_configure, [[alive_prompt: "%counter>"]]}}, 5000)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
Wonder what the idiomatic approach to this would be?
Most Liked
LostKobrakai
If none of that needs to be set at runtime you can put the config in config/prod.exs.
2
fcbry
Woops, just noticed the following in my code, distracted coding. I think this is what’s wrong.
IEx.configure(alive_prompt: "%counter>")
IEx.configure(default_prompt: "%counter>")
2
Popular in Questions
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Background
Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ comma...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Other popular topics
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Manning 2016 Halloween weekend sale via Deal of the Day
Friday, October 28 - Half off all MEAPs - code WM102816LT
Saturday, October 29 ...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
I would like to know what is the best IDE for elixir development?
New
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
What is most correct way to open, read and parse JSON file with poison?
For example if we have example.json file in root of some projec...
New
Hi,
I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New







