How to leave the execute prompt in zsh
9,436
Ctrl+G aborts the current editing command in Bash and Zsh if you are in Emacs mode (which is usually the default mode).
Related videos on Youtube
Comments
-
lolesque over 1 year
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?
-
Adaephon almost 8 yearsAre you sure you get the prompt for showing all possibilities on Ctrl+C? Usually this should close the "execute:" prompt. I only get this prompt on Enter (on an empty line) and Escape. As far as I can see from the manpage, this is also seems to be not configurable.
-
Robert Johnstone over 6 yearsI've got the same problem and I have an ominous feeling I have mapped the key to get out of this to something else
-
lolesque over 6 years@Sevenearths did you set any TRAP that you forgot to clear ? Your comment reminded me how I solved this bug (I think).
-
ram over 3 yearsDoes anyone know what this mode is called or how to actually use it?
-
Jim James over 3 yearsIt's called
execute-named-cmd
, triggered by in:
in normal mode if you're using vim bindings.
-
-
Lqueryvg about 4 yearsThanks for the answer. Small note...
Ctrl
+g
seems to work in vi mode too. -
Scott - Слава Україні over 3 yearsAre you willing to give your computer to lolesque (the OP)? Because otherwise, telling what works on your computer isn’t any help to them, or to anybody else who has the same problem, inasmuch as the question says “Pressing Ctrl+C does nothing”.