// Colourize char if stdout supports colours
if (process.stdout.isTTY) {
- tail = tail.replace(/(.{1,}?)([^\w]|$)/, '\033[32m$1\033[39m$2');
+ tail = tail.replace(/(.+?)([^\w]|$)/, '\033[32m$1\033[39m$2');
}
// Return source line with coloured char at `position`
ignored = ['pause', 'resume', 'exitRepl', 'handleBreak',
'requireConnection', 'killChild', 'trySpawn',
'controlEval', 'debugEval', 'print', 'childPrint'],
- synonym = {
+ shortcut = {
'run': 'r',
'cont': 'c',
'next': 'n',
'step': 's',
- 'out': 'o'
+ 'out': 'o',
+ 'backtrace': 'bt'
};
function defineProperty(key, protoKey) {
for (var i in proto) {
if (proto.hasOwnProperty(i) && ignored.indexOf(i) === -1) {
defineProperty(i, i);
- if (synonym[i]) defineProperty(synonym[i], i);
+ if (shortcut[i]) defineProperty(shortcut[i], i);
}
}