binarypaladin
IEx history works only once
I’ve recently had to transition to a new laptop and IEx history is being weird. I open up a session, do some stuff, leave. Start a new session, press up and as one would expect the history shows up.
Trouble is, that’s officially the last time it works. If I hunt down the .erlang-history folder and blow it away, same deal. it works… once.
This is on a Mac if that matters. Shell variables are as follows: export ERL_AFLAGS="-kernel shell_history enabled shell_history_path '\"$HOME/.erlang-history\"'"
I’ve never had this issue before. The files appear to have proper write permissions. I specifically changed the default shell_history_path to what you see above and that didn’t solve the issue either.
Elixir 1.16.0 (compiled with Erlang/OTP 24) using asdf.
Most Liked
gregvaughn
I forget the details, but I’ve taught myself Ctrl-g q as the “nicest” way of exiting.
binarypaladin
All right, so… the issue is actually that there appears to be a delay before the history is committed and if you exit too fast the last command is cut off. It was a sort of perfect storm to make it look like it was something else.
arcanemachine
Slightly related:
I’m not sure of course, but I would guess you’re doing a “hard exit” when you exit IEx.
TBH I’m honestly still not sure what is the best way of exiting IEx is. I hit Ctrl + C twice, but I feel like that could bite me one day.
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










