如何使自定义提示在IEX启动时生效? [英] How to make custom prompt take effect at iex start?

查看:68
本文介绍了如何使自定义提示在IEX启动时生效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义提示,但是当我启动 iex 时,会显示一个内置提示。 之后,我按Enter键,提示生效。当 iex 开始时如何使我的提示生效?

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?

这是我所看到的:

这是我的 .iex .exs 文件:

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
)


推荐答案

这是 iex 中的错误。我已经找到并修复它: https://github.com/elixir-lang/ elixir / pull / 4895

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

这篇关于如何使自定义提示在IEX启动时生效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆