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
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
Student & New to elixir. Nice language.
I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
Hello everybody,
usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
Hi,
I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
Other popular topics
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine)
This is a plugin that adds support for Elixir to JetBrains IntelliJ...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I'm writing a test for one of t...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this
"1000"
What is the ...
New
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
The Elixir Typespec docs show the following syntax for keyword lists in typespecs:
# ...
| [key: type] # keyword lis...
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,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
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








