def default(self, statement: Statement) -> Optional[bool]:
        """Executed when the command given isn't a recognized command implemented by a do_* method.

        :param statement: Statement object with parsed input
        """
        if self.default_to_shell:
            if 'shell' not in self.exclude_from_history:
                self.history.append(statement)

            return self.do_shell(statement.command_and_args)
        else:
            err_msg = self.default_error.format(statement.command)
            self.decolorized_write(sys.stderr, "{}\n".format(err_msg))