From c1629135bb2cc67f3d34a87bcb799762d1fcde90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Sat, 15 Feb 2014 23:51:57 +0100 Subject: [PATCH] Improve REPL multi-line behavior --- src/frida/repl.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frida/repl.py b/src/frida/repl.py index 6f6297b..1e422d7 100644 --- a/src/frida/repl.py +++ b/src/frida/repl.py @@ -80,18 +80,18 @@ recv(onExpression); self._idle.wait() expression = "" line = "" - while len(line.strip()) == 0 or line.endswith(" "): + while len(expression) == 0 or line.endswith("\\"): try: - if len(expression.strip()) == 0: - line = input_impl(">> ") + if len(expression) == 0: + line = input_impl(">>> ") else: - line = input_impl(" > ") + line = input_impl("... ") except EOFError: return if len(line.strip()) > 0: if len(expression) > 0: expression += "\n" - expression += line + expression += line.rstrip("\\") readline.add_history(expression) self._idle.clear()