Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 426 Bytes

bash-edit-and-execute-command.md

File metadata and controls

11 lines (9 loc) · 426 Bytes
tags
bash
devops
hint

If you're using bash, try the edit-and-execute-command command. By default, this is assigned to Ctrl-x Ctrl-e (type ctrl-x, then ctrl-e).

This should open whatever editor is specified in your environment. Whatever is in the buffer when you exit will execute in the shell - including multiple-line commands.

Unfortunately fish shell doesn't support