Bash – Opening Your Command Prompt In A Text Editor – What Is This Called

bashline-editorshell

One of my favorite tricks in Bash is when I open my command prompt in a text editor. I do this (in vi mode) by pressing ESC v. When I do this, whatever is in my command prompt is now displayed in my $EDITOR of choice. I can then edit the command as if it were a document, and when I save and exit everything in that temp file is executed.

I'm surprised that none of my friends have heard of this tip, so I've been looking for docs I can share. The problem is that I haven't been able to find anything on it. Also, the search terms related to this tip are very common, so that doesn't help when Googling for the docs.

Does anyone know what this technique is called so I can actually look it up?

Best Answer

In bind -p listing, I can see the command is called edit-and-execute-command, and is bound to C-xC-e in the emacs mode.