Celeb Glow
updates | March 11, 2026

How to leave the execute prompt in zsh

In a zsh, maybe I pressed Alt+X by mistake, but now I'm stuck and this execute: _ prompt won't leave.

Pressing Ctrl+C does nothing.  If I press Enter it tries to complete what I typed.

Pressing Enter on an empty line:

execute: _
zsh: do you wish to see all 373 possibilities (64 lines)?

Typing q and pressing Enter:

execute: quote_
quoted-insert quote-line quote-region

In other shells, Alt+X brings the same behavior, except that Ctrl+C cancels the prompt.

Is there a way to get out or is this shell dead?

5

3 Answers

Ctrl+G aborts the current editing command in Bash and Zsh if you are in Emacs mode (which is usually the default mode).

1

I succeeded by trying Ctrl+ everything, to see the behavior.

When I pressed Ctrl+S, the terminal emulator told me that output was blocked.  Then I pressed Ctrl+Q to enable output back, and my prompt came back to normal.

When I press Alt+X again, I have the same problem, but if I execute a zsh internal command it does it.

That's actually the current terminal / shell that doesn't receive Ctrl+C, I don't know why.

Edit from some time after (Oct 2017): It's probable that I had this bug due to a TRAP INT set up in my shell during some function and forgot to remove it.

ctrl + c
is working for me, using
ctrl + g 
will print
^g
on my terminal 1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy