‘soft return’ in iTerm2

command lineitermterminal

I'm just wondering is there a way to enter a new line in iTerm 2 without executing the line being typed?
I am looking to make use of some relatively long commands to automate some things, but not being able to format things is proving to make long commands hard to read.

Is there any way to enter line breaks or soft returns so that when enter is pressed the whole command will still execute?

Best Answer

Not sure if I understand correctly. If you put \ at the end and press enter, it is treated as continuation of the line and control goes to next line for you to type more. Only when you press enter on a line that doesn't end in \ is when the entire piece of code gets executed on the shell. So in a way \ could be you soft return.