onComplete = function onComplete(err) {
          if (_this.session.isLocal() && err) {
            _this.session.log(err.stack || err);
            _this.session.parent.emit('client_command_error', { command: _this.downstream.command, error: err });
          }
          _this.session.completeCommand();
        }
Route stdout either through a piped command, or the session's stdout.