soup

soup

Sometimes when poking around in IEx, I will mis-pair a bracket or quote and get “stuck”. This often happens if I mispaste something.

In irb I could always just ctrl-c to basically cancel the current input buffer and put me back in the “root” of the interpreter.

irb(main):002:1* arst(
irb(main):003:1*   nieo
irb(main):004:1>
^C
irb(main):002:0>

In IEx I get this

iex(1)> arst(
...(1)> nieo
...(1)>
BREAK: (a)bort (A)bort with dump (c)ontinue (p)roc info (i)nfo
       (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution

And from my poking around, a/A quit IEx, c puts me back where I was, p,i,l,v,D,d,k are informational or for killing processes (maybe the current IEx is hidden in there).

Is there a way to just throw out all the current input (short of working out what pair is open and manually closing them all)? I want to retain the rest of my IEx state.

Marked As Solved

michallepicki

michallepicki

Also Liked

axelson

axelson

Scenic Core Team

Another alternative (which is what I use) is pressing Ctrl-g i<RET>c<RET> (you can press Ctrl-g h<RET> to get an associated help menu). Sometimes I’ve also used Ctrl-] to close the currently open bracket, but that hasn’t actually come in handy too often for me when I get stuck.

There was a email thread on the Elixir Google group a while back about this, but if I recall correctly changes would have to be made to Erlang’s erl in order to change the Ctrl-c behavior.

Last Post!

soup

soup OP

Ah I did look at ctrl-g but didn’t put the interrupt-reconnect together.

There was a email thread on the Elixir Google group a while back about this, but if I recall correctly changes would have to be made to Erlang’s erl in order to change the Ctrl-c behavior.

It would be nice if there were a hotkey for it, doesn’t have to be ctrl-c. ctrl-d (“EOF/EOT”, exits the python interpreter IIRC) just rings my term bell, I don’t think it’s used for anything in IEx atm and is reasonably semantic.

I assume that could just be a patch to IEx to basically macro #iex:break?

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews