'Compare two command instances to each other by matching their
key and aliases.
Args:
cmd (Command or str): Allows for equating both Command
objects and their keys.
Returns:
equal (bool): If the commands are equal or not.'

def __eq__(self, cmd):

    try:
        return self._matchset.intersection(cmd._matchset)
    except AttributeError:
        return (cmd in self._matchset)
