How to make custom prompt take effect at iex start?

时光毁灭记忆、已成空白 提交于 2019-11-30 08:35:48

问题


I have a custom prompt but when I launch iex, a builtin prompt shows. After I hit enter my prompt takes effect. How can I make my prompt take effect when iex starts?

Here's what I'm seeing:

And this is my .iex.exs file:

IEx.configure(
  colors: [ enabled: true],
  default_prompt: [
      "\e[G",   # move to column 1
      "\e[35m", # magenta
      "MY %prefix(%counter)",
      ">",
      "\e[0m"   # reset
    ] |> IO.chardata_to_string
)

回答1:


It's a bug in iex. I've tracked down and fixed it: https://github.com/elixir-lang/elixir/pull/4895



来源:https://stackoverflow.com/questions/37974476/how-to-make-custom-prompt-take-effect-at-iex-start

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!