ela
Contents

ManualShell

Multi-line input

In the terminalela --spec multi-line-input

  • A line that opens a block (if, for, while, switch, with, proc, struct, enum, catch) shows a continuation prompt until the matching end. A block with its body on its line, if $x; echo hi, is whole at Enter and runs.
  • The same applies to a line ending with an open bracket, a comma, a pipe or =, to an open """, ''' or ``` until its closing marker, and to a line ending with \ inside double quotes. A one-line string left open is an error at once.
  • Each line of a block is edited on its own, after the continuation prompt ...> ; Ctrl-C, or Ctrl-D on an empty line, drops the whole block (Errors and interrupts). Outside double quotes a trailing backslash continues nothing: ela has no backslash continuation of a command.
  • A finished block is one history entry: Up brings it back whole, to edit and run again.