Bash edit command

I like doing a lot in one command. Downside it that stuff can get messy. One big line. you can’t easily edit it.
A shortcut to make it easier is ctrl-x e That will open the current command in an editor.

Few thinks to keep in mind.

  • Multiple lines will work, but it will execute it as separate commands.
  • using && at the end of lines will fix that.
  • Which of course means you get it in the history at full.
    My main use to chain commands.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.