debugger: 'scripts' command was conflicting with 's'

pull/22966/head
Ryan Dahl 2010-12-23 10:18:06 -08:00
parent 0adc6b29bd
commit 080daf9ddd
1 changed files with 13 additions and 12 deletions

View File

@ -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) {