Skip to content
Browse files

"done" and "job" events

  • Loading branch information...
1 parent 5cb3a67 commit f7c213ede820956cde3db5ab21b3c75073478cf4 @substack committed Nov 19, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 index.js
View
3 index.js
@@ -265,7 +265,6 @@ Bash.prototype.createStream = function () {
output.queue(buf);
});
j.on('end', function () {
-console.log('JOB END');
if (--pending === 0) input.queue(null);
});
});
@@ -419,7 +418,9 @@ Bash.prototype.eval = function (line) {
cmd.on('end', function () {
var ix = self._jobs.indexOf(cmd);
self._jobs.splice(ix, 1);
+ self.emit('done', cmd);
});
+ self.emit('job', cmd);
cmd = shiftCommand();
}
else if (op === '>') {

0 comments on commit f7c213e

Please sign in to comment.
Something went wrong with that request. Please try again.