panchog
user-switch-command fails to start an iex shell
Hello – Elixir newbee here.
Today I’ve learned about the user-switch-command (IEx — IEx v1.20.2), and doing an s iex fails with an error message mentioning set_unicode_state
On the same session, doing an s shell opens an additional Erlang shell, and it works without issue.
Here are all the details from my session (I am on macOS 15.5)
elixir
1.10.2-otp-22
1.18.4
*1.18.4-otp-28
erlang
*28.0.1
➜ iex
Erlang/OTP 28 [erts-16.0.1] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1]
Interactive Elixir (1.18.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> d = Date.utc_today
~D[2025-06-30]
iex(2)> d
~D[2025-06-30]
iex(3)>
User switch command (enter 'h' for help)
--> s
--> j
1 {iex,start,[[{dot_iex,nil},{on_eof,halt}],{elixir,start_cli,[]}]}
2* {shell,start,[]}
--> c
Eshell V16.0.1 (press Ctrl+G to abort, type help(). for help)
1> d.
d
2>
User switch command (enter 'h' for help)
--> c 1
iex(3)> d
~D[2025-06-30]
iex(4)>
User switch command (enter 'h' for help)
--> s iex
--> j
1 {iex,start,[[{dot_iex,nil},{on_eof,halt}],{elixir,start_cli,[]}]}
2 {shell,start,[]}
3* {iex,start,[]}
--> c
{unknown,{<0.66.0>,set_unicode_state,true}}
Interactive Elixir (1.18.4) - press Ctrl+C to exit (type h() ENTER for help)
*** ERROR: Shell process terminated! (^G to start new job) ***
14:06:11.669 [error] :gen_statem #PID<0.110.0> terminating
** (MatchError) no match of right hand side value: {#PID<0.66.0>, :set_unicode_state, true}
(kernel 10.3.1) group.erl:530: :group.handle_info/3
(stdlib 7.0.1) gen_statem.erl:3748: :gen_statem.loop_state_callback/11
(stdlib 7.0.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3
Process Label: {:group, {:iex, :start, []}}
Queue: [info: {#PID<0.66.0>, :set_unicode_state, true}]
Postponed: [info: {#PID<0.66.0>, :activate}]
State: {:server, {:state, :binary, #PID<0.66.0>, true, :none, false, #PID<0.111.0>, :cooked, [], true, &:edlin_expand.expand/2, true, {[], []}, [], :undefined}}
Callback mode: :state_functions, state_enter: false
14:06:11.677 [error] Process #PID<0.111.0> raised an exception
** (ErlangError) Erlang error: :terminated:
* 1st argument: the device has terminated
(stdlib 7.0.1) io.erl:202: :io.put_chars(:standard_io, ["Interactive Elixir (1.18.4) - press Ctrl+C to exit (type h() ENTER for help)", 10])
(iex 1.18.4) lib/iex/server.ex:86: IEx.Server.run_without_registration/3
User switch command (enter 'h' for help)
--> j
1 {iex,start,[[{dot_iex,nil},{on_eof,halt}],{elixir,start_cli,[]}]}
2 {shell,start,[]}
--> c 1
iex(4)>
User switch command (enter 'h' for help)
--> c 2
2> d.
d
3>
Popular in Questions
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
If I have a post route which an argument:
post /my_post_route/:my_param1, MyController.my_post_handler
How would get the post params ...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
For example for a current url like
http://localhost:4000/cosmetic/products?_utf8=✓&query=perfume&page=2,
I would like to get:
...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Hello everybody,
usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
Lets say I have map like this fetching from my database
%{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Other popular topics
If I have a post route which an argument:
post /my_post_route/:my_param1, MyController.my_post_handler
How would get the post params ...
New
Hello, how can I check the Phoenix version ?
Thanks !
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this:
...
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
Got a question about when to concat vs. prepending items to list then reversing to achieve appending.
So i know lists boil down to [1 | ...
New
I would like to know what is the best IDE for elixir development?
New
Update:
How to use the Blogs & Podcasts section
You can post links to your blog posts or podcasts either in one of the Official Blog...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
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









