From 080daf9ddddc05c4ed9efc3e37fac7d52fb9fb17 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 23 Dec 2010 10:18:06 -0800 Subject: [PATCH] debugger: 'scripts' command was conflicting with 's' --- lib/_debugger.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index 6be3fa55b8c..0dd3b93144b 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -350,6 +350,18 @@ function startInterface() { term.prompt(); }); + } else if (cmd == 'scripts') { + c.reqScripts(function (res) { + if (/full/.test(cmd)) { + console.log(res); + } else { + var text = res.map(function (x) { return x.text; }); + console.log(text.join('\n')); + } + term.prompt(); + }); + + } else if (/^continue/.test(cmd) || /^c/.test(cmd)) { c.reqContinue(function (res) { // Wait for break point. (disable raw mode?) @@ -365,17 +377,6 @@ function startInterface() { // Wait for break point. (disable raw mode?) }); - } else if (/^scripts/.test(cmd)) { - c.reqScripts(function (res) { - if (/full/.test(cmd)) { - console.log(res); - } else { - var text = res.map(function (x) { return x.text; }); - console.log(text.join('\n')); - } - term.prompt(); - }); - } else if (/^print/.test(cmd) || /^p/.test(cmd)) { var i = cmd.indexOf(' '); if (i < 0) { @@ -409,7 +410,7 @@ function startInterface() { }); c.on('break', function (res) { - var result = '\r\n'; + var result = ''; if (res.body.breakpoints) { result += 'breakpoint'; if (res.body.breakpoints.length > 1) {