class Byebug::Interface

def split_commands(cmd_line)


array of commands: [cmd1, cmd2, ..., cmdN]
Splits a command line of the form "cmd1 ; cmd2 ; ... ; cmdN" into an
def split_commands(cmd_line)
  return [""] if cmd_line.empty?
  cmd_line.split(/;/).each_with_object([]) do |v, m|
    if m.empty? || m.last[-1] != '\\'
      m << v.strip
      next
    end
    m.last[-1, 1] = ""
    m.last << ";" << v
  end
end