Saving complex commands can save a lot of time and effort (Photo by Sai Kiran Anagani on Unsplash)

Not too long ago I discovered ctrl-x-e (holding ctrl, press x then e) to pop open the command currently typed in your shell (bash and zsh; you may need to enable it in zsh) into your favourite text editor, whichever is set to $VISUAL or $EDITOR.

I wish I had discovered this long ago. With the power of Vim or other editors, it’s a breeze to compose complex, multi-line, or repetitive commands using your favourite editing tool. Writing and quitting in your editor fills in that command at your shell prompt.

Today came the logical leap to using this trick…

Harry Jubb

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store