diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-01-13 11:13:57 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-01-13 13:32:16 -0800 |
commit | cb71a7dab3043ecf7016caec2de234624e10360c (patch) | |
tree | 3bca822db76bd6d2a23440f31cc06ceb7f110a1b /lib | |
parent | 29f48d48e51da1bb3a267584f0101e3b848957ae (diff) | |
download | node-new-cb71a7dab3043ecf7016caec2de234624e10360c.tar.gz |
debugger: take help message from commands
Diffstat (limited to 'lib')
-rw-r--r-- | lib/_debugger.js | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/lib/_debugger.js b/lib/_debugger.js index 6392b88293..554cdaa097 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -307,10 +307,25 @@ Client.prototype.step = function(action, count, cb) { }; +var commands = [ + 'backtrace', + 'continue', + 'help', + 'info breakpoints', + 'kill', + 'list', + 'next', + 'print', + 'quit', + 'run', + 'scripts', + 'step', + 'version', +]; -var helpMessage = 'Commands: run, kill, print, step, next, ' + - 'continue, list, scripts, backtrace, version, quit'; +var helpMessage = 'Commands: ' + commands.join(', '); + function SourceUnderline(sourceText, position) { if (!sourceText) return; @@ -402,23 +417,6 @@ function Interface() { } -var commands = [ - 'backtrace', - 'continue', - 'help', - 'info breakpoints', - 'kill', - 'list', - 'next', - 'print', - 'quit', - 'run', - 'scripts', - 'step', - 'version', -]; - - Interface.prototype.complete = function(line) { // Match me with a command. var matches = []; |