def define_alias(self, name, cmd):
nargs = self.validate_alias(name, cmd)<EOL>self.alias_table[name] = (nargs, cmd)<EOL>
Define a new alias after validating it.

        This will raise an :exc:`AliasError` if there are validation
        problems.