# File lib/lowline.rb, line 110 def ask_multiline q puts "#{q} (ctrl-d, ., or /stop to stop, /edit to edit, /reset to reset):" ans = "" while true if Ditz::has_readline? line = Readline::readline('> ') else (line = STDIN.gets) && line.strip! end if line if Ditz::has_readline? Readline::HISTORY.push(line) end case line when /^\.$/, "/stop" break when "/reset" return ask_multiline(q) when "/edit" return ask_via_editor(q, ans) else ans << line + "\n" end else puts break end end ans.multistrip end