|
|
@ -69,7 +69,7 @@ module.paths = require('module')._nodeModulePaths(module.filename); |
|
|
|
// Can overridden with custom print functions, such as `probe` or `eyes.js`
|
|
|
|
exports.writer = util.inspect; |
|
|
|
|
|
|
|
var builtinLibs = ['assert', 'buffer', 'child_process', 'cluster', |
|
|
|
exports._builtinLibs = ['assert', 'buffer', 'child_process', 'cluster', |
|
|
|
'crypto', 'dgram', 'dns', 'events', 'fs', 'http', 'https', 'net', |
|
|
|
'os', 'path', 'punycode', 'querystring', 'readline', 'repl', |
|
|
|
'string_decoder', 'tls', 'tty', 'url', 'util', 'vm', 'zlib']; |
|
|
@ -181,7 +181,7 @@ function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) { |
|
|
|
|
|
|
|
// Check if a builtin module name was used and then include it
|
|
|
|
// if there's no conflict.
|
|
|
|
if (~builtinLibs.indexOf(cmd)) { |
|
|
|
if (exports._builtinLibs.indexOf(cmd) !== -1) { |
|
|
|
var lib = require(cmd); |
|
|
|
if (cmd in self.context && lib !== self.context[cmd]) { |
|
|
|
self.outputStream.write('A different "' + cmd + |
|
|
@ -456,7 +456,7 @@ REPLServer.prototype.complete = function(line, callback) { |
|
|
|
} |
|
|
|
|
|
|
|
if (!subdir) { |
|
|
|
completionGroups.push(builtinLibs); |
|
|
|
completionGroups.push(exports._builtinLibs); |
|
|
|
} |
|
|
|
|
|
|
|
completionGroupsLoaded(); |
|
|
|