vonH
Am I missing some kind of readline facility in my setup?
I am trying out a small app using Plug, using the code from this question - Simple Elixir web page - use Phoenix or not?, which is based on the Plug docs - Plug — Plug v1.20.2.
After I use Ctrl-C to stop the server, recompile and restart I realize that I can’t use the cursor key to recollect the commands from the previous session.
The cursor keys give only the commands I have entered in the new iex -S mix session.
Is that the normal behaviour? Command line tools mysql and psql have a history going back to previous sessions and I wonder if iex has the samel
Marked As Solved
vonH
I guess this is one question I can answer myself. I came across it when trying out erlang but couldn’t remember the debian package name, rlwrap
There is another option using a Erlang History
More about both here - http://stackoverflow.com/questions/22426716/how-to-save-log-the-output-of-the-iex-shell-to-get-persistent-command-history/28514369#28514369
Also Liked
outlog
I use this in my dev env
I would not use this in production (due to production paranoia
).
wmnnd
Unfortunately, there is no such feature because it’s not supported by the underlying Erlang shell. There is a closed issue on Github which documents this: Saving iex history to a file between runs · Issue #2945 · elixir-lang/elixir · GitHub
The erlang-history module mentioned by @outlog and also referenced in the Gihub issue seems to be a little bit hacky and its author stated that the history might get corrupted from time to time. But still, better than no history at all, I suppose ![]()
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









