【问题标题】:ERL_AFLAGS history configure environment errorERL_AFLAGS 历史配置环境错误
【发布时间】:2023-01-08 06:28:06
【问题描述】:

我想保存 iex shell 历史,并设置 ERL_AFLAGS 如下:

当启动 iex 时,它会给出错误信息。

操作系统是mac os。 erl 版本 Erlang/OTP 24 [erts-12.3.2.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit] [dtrace] , 长生不老药版本长生不老药(1.13.4)。

$ rm ~/.iex_history 
$ mkdir ~/.iex_history
$ export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_path '"$HOME/.iex_history"'"
$ iex
{"could not start kernel pid",application_controller,"{bad_environment_value,\"/Users/yuchen/.iex_history\"}"}
2022-07-27 04:24:50.471190 application_controller: ~ts: ~ts~n
    ["syntax error before: ","'/'"]
    "/Users/yuchen/.iex_history"
could not start kernel pid (application_controller) ({bad_environment_value,"/Users/yuchen/.iex_history"})

Crash dump is being written to: erl_crash.dump...done

【问题讨论】:

    标签: elixir


    【解决方案1】:

    您似乎忘记了使用 转义内部 " 引号:添加它们后它会起作用:

    export ERL_AFLAGS="-kernel shell_history enabled -kernel shell_history_path '"$HOME/.iex_history"'"
    

    【讨论】:

      猜你喜欢
      • 2014-05-24
      • 2021-05-28
      • 2012-08-03
      • 1970-01-01
      • 2019-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-03
      相关资源
      最近更新 更多