It is common in text editors to have special line break that doesn't create new paragraph. Usually with ⌥ Option⏎ Return shortcut. I want to achieve something similar but in terminal:

on ⌥ Option⏎ Return instead of inserting new line I want to insert Space </kbd> + new line ( \\n) so that I can continue to write long command on the next line.

$ git \
status \
  • 1
    Terminal is not a text editor so you can't treat it the same. Just enter the backslash and press enter. You'll get a > prompt where you can add the next line. Add another backslash for another line or just press enter when done. – Allan Jun 10 at 17:35
  • Isn’t it up to the shell to parse the keyboard input and decide what to do or are you asking us to synthesize the \ and enter from a key press? I’m not entirely sure what the “ask” is here. – bmike Jun 10 at 17:44

You must log in to answer this question.

Browse other questions tagged .