|
@ -20,6 +20,8 @@ var fs = require("fs"); |
|
|
var rl = require('readline'); |
|
|
var rl = require('readline'); |
|
|
var context; |
|
|
var context; |
|
|
|
|
|
|
|
|
|
|
|
var disableColors = process.env.NODE_DISABLE_COLORS ? true : false; |
|
|
|
|
|
|
|
|
function cwdRequire (id) { |
|
|
function cwdRequire (id) { |
|
|
if (id.match(/^\.\.\//) || id.match(/^\.\//)) { |
|
|
if (id.match(/^\.\.\//) || id.match(/^\.\//)) { |
|
|
id = path.join(process.cwd(), id); |
|
|
id = path.join(process.cwd(), id); |
|
@ -54,7 +56,7 @@ function REPLServer(prompt, stream) { |
|
|
return self.complete(text); |
|
|
return self.complete(text); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if (rli.enabled) { |
|
|
if (rli.enabled && !disableColors) { |
|
|
// Turn on ANSI coloring.
|
|
|
// Turn on ANSI coloring.
|
|
|
exports.writer = function(obj, showHidden, depth) { |
|
|
exports.writer = function(obj, showHidden, depth) { |
|
|
return sys.inspect(obj, showHidden, depth, true); |
|
|
return sys.inspect(obj, showHidden, depth, true); |
|
|